assets.mk 949 B

12345678910111213141516171819
  1. ASSETS_DIR := $(PROJECT_ROOT)/assets
  2. ASSETS_COMPILLER := $(PROJECT_ROOT)/scripts/assets.py
  3. ASSETS_COMPILED_DIR := $(ASSETS_DIR)/compiled
  4. ASSETS_SOURCE_DIR := $(ASSETS_DIR)/icons
  5. ASSETS_SOURCES += $(shell find $(ASSETS_SOURCE_DIR) -type f -iname '*.png' -or -iname 'frame_rate')
  6. ASSETS += $(ASSETS_COMPILED_DIR)/assets_icons.c
  7. PROTOBUF_SOURCE_DIR := $(ASSETS_DIR)/protobuf
  8. PROTOBUF_COMPILER := $(PROJECT_ROOT)/lib/nanopb/generator/nanopb_generator.py
  9. PROTOBUF_COMPILED_DIR := $(ASSETS_COMPILED_DIR)
  10. PROTOBUF_SOURCES := $(shell find $(PROTOBUF_SOURCE_DIR) -type f -iname '*.proto')
  11. #PROTOBUF_FILENAMES := $(notdir $(PROTOBUF))
  12. PROTOBUF_FILENAMES := $(notdir $(addsuffix .pb.c,$(basename $(PROTOBUF_SOURCES))))
  13. PROTOBUF := $(addprefix $(PROTOBUF_COMPILED_DIR)/,$(PROTOBUF_FILENAMES))
  14. PROTOBUF_CFLAGS += -DPB_ENABLE_MALLOC
  15. CFLAGS += -I$(ASSETS_COMPILED_DIR) $(PROTOBUF_CFLAGS)
  16. C_SOURCES += $(wildcard $(ASSETS_COMPILED_DIR)/*.c)