Furquan Shaikh | 6ef863c | 2021-10-01 11:39:48 -0700 | [diff] [blame] | 1 | ifeq ($(CONFIG_STITCH_ME_BIN),y) |
| 2 | |
| 3 | objcse := $(obj)/cse |
| 4 | additional-dirs += $(objcse) |
| 5 | |
| 6 | define cse_input_path |
| 7 | $(call strip_quotes,$(CONFIG_CSE_COMPONENTS_PATH))/$(call strip_quotes,$(1)) |
| 8 | endef |
| 9 | |
| 10 | define cse_add_dummy |
| 11 | $(eval cse_$(1)_ingredients+=$(2)) |
| 12 | endef |
| 13 | |
| 14 | define cse_add_dummy_to_bp1_bp2 |
| 15 | $(call cse_add_dummy,bp1,$(1)) |
| 16 | $(call cse_add_dummy,bp2,$(1)) |
| 17 | endef |
| 18 | |
| 19 | define cse_add_file |
| 20 | $(eval cse_$(3)_ingredients+=$(4)) |
| 21 | $(eval file=$(2)) |
| 22 | $(eval $(4)-file=$(file)) |
| 23 | $(eval $(1)+=$(if $(filter $(file),$($(1))),,$(file))) |
| 24 | endef |
| 25 | |
| 26 | define cse_add_decomp |
| 27 | $(call cse_add_file,cse_decomp_files,$(objcse)/$(2),$(1),$(2)) |
| 28 | endef |
| 29 | |
| 30 | define cse_add_decomp_to_bp1_bp2 |
| 31 | $(call cse_add_decomp,bp1,$(1)) |
| 32 | $(call cse_add_decomp,bp2,$(1)) |
| 33 | endef |
| 34 | |
| 35 | define cse_add_input |
| 36 | $(call cse_add_file,cse_input_files,$(call cse_input_path,$(CONFIG_CSE_$(2)_FILE)),$(1),$(2)) |
| 37 | endef |
| 38 | |
| 39 | define cse_add_input_to_bp1_bp2 |
| 40 | $(call cse_add_input,bp1,$(1)) |
| 41 | $(call cse_add_input,bp2,$(1)) |
| 42 | endef |
| 43 | |
| 44 | endif |