assets.mk 1002 B

123456789101112131415161718192021
  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. DOLPHIN_SOURCE_DIR := $(ASSETS_DIR)/dolphin
  8. DOLPHIN_OUTPUT_DIR := $(ASSETS_DIR)/resources/dolphin
  9. PROTOBUF_SOURCE_DIR := $(ASSETS_DIR)/protobuf
  10. PROTOBUF_COMPILER := $(PROJECT_ROOT)/lib/nanopb/generator/nanopb_generator.py
  11. PROTOBUF_COMPILED_DIR := $(ASSETS_COMPILED_DIR)
  12. PROTOBUF_SOURCES := $(shell find $(PROTOBUF_SOURCE_DIR) -type f -iname '*.proto')
  13. PROTOBUF_FILENAMES := $(notdir $(addsuffix .pb.c,$(basename $(PROTOBUF_SOURCES))))
  14. PROTOBUF := $(addprefix $(PROTOBUF_COMPILED_DIR)/,$(PROTOBUF_FILENAMES))
  15. PROTOBUF_CFLAGS += -DPB_ENABLE_MALLOC
  16. CFLAGS += -I$(ASSETS_COMPILED_DIR) $(PROTOBUF_CFLAGS)
  17. C_SOURCES += $(wildcard $(ASSETS_COMPILED_DIR)/*.c)