summaryrefslogtreecommitdiff
path: root/build/setup.mk
diff options
context:
space:
mode:
Diffstat (limited to 'build/setup.mk')
-rw-r--r--build/setup.mk11
1 files changed, 8 insertions, 3 deletions
diff --git a/build/setup.mk b/build/setup.mk
index a48a4f9..178f070 100644
--- a/build/setup.mk
+++ b/build/setup.mk
@@ -4,23 +4,28 @@
TARGETS ?= host
-DEFAULT_MODULES ?= intf arch arch/host arch/host/mex
+DEFAULT_MODULES ?= ucoo/intf ucoo/arch ucoo/arch/host ucoo/arch/host/mex
ALL_PROGS := $(PROGS) $(foreach target,$(TARGETS),$($(target)_PROGS))
ALL_MODULES := $(sort $(DEFAULT_MODULES) $(MODULES) \
$(foreach prog,$(ALL_PROGS),$($(prog)_MODULES)))
+ALL_UCOO_MODULES := $(filter ucoo/%,$(ALL_MODULES))
+ALL_EXT_MODULES := $(filter-out ucoo/%,$(ALL_MODULES))
-include $(ALL_MODULES:%=$(BASE)/ucoo/%/Module)
+include $(ALL_UCOO_MODULES:%=$(UCOO_BASE)/%/Module)
+include $(ALL_EXT_MODULES:%=$(BASE)/%/Module)
define MODULES_template
$1_SOURCES += $$(foreach module,\
$$(DEFAULT_MODULES) $$(call defval,$1_MODULES,$$(MODULES)),\
- $$($$(subst /,_,$$(module))_SOURCES)\
+ $$(addprefix $$(module)/,$$($$(subst /,_,$$(module))_SOURCES))\
)
endef
$(foreach prog,$(ALL_PROGS),$(eval $(call MODULES_template,$(prog))))
ALL_SOURCES := $(foreach prog,$(ALL_PROGS),$($(prog)_SOURCES))
+OBJDIRS := $(sort $(dir $(ALL_SOURCES:%=$(OBJDIR)/%)))
+
COMPILE_DEPS :=