# directory where files with 'main' functions live (can be in SRC_DIR)
DRIVER_DIR := $(SRC_DIR)/bin
# make configuration directory
-CONF_DIR := $(ROOT_DIR)/.make
+CONF_DIR := $(ROOT_DIR)/make
# Source languages handled by this build system. These languages are capable of
# being compiled to an intermediary format for binary output by one of the
# provided compilersfor each language
$(eval DRIVER_LDVALS := $(file <$(1:%.$2=%.ld)))
$(eval DRIVER_LFLAGS := $(filter -l%,$(DRIVER_LDVALS)))
$(eval DRIVER_MODULES += $(filter-out -l%,$(DRIVER_LDVALS)))
-
+$(eval DRIVER_MODULES := $(sort $(DRIVER_MODULES)))
# List of module archives to link together during compilation
$(eval DRIVER_ARCHIVES := $(DRIVER_MODULES:%=$(SRC_DIR)/%.$($2_AROBJ)))
$(eval DRIVER_DEPS := $(DRIVER_SOB) $(DRIVER_ARCHIVES))
# modules as static libs).#######################################################
define MODULE_ARCRULE =
$(eval ARCDEPS := $(filter $(SRC_DIR)/$1/%.$(c_OBJ),$(foreach lang,$(LANGS),$($(lang)_MOD_TRG))))\
-$(eval MAKE_TARGETS+= $1.$(c_AROBJ))\
+$(eval MAKE_TARGETS+= $(SRC_DIR)/$1.$(c_AROBJ))\
$(SRC_DIR)/$1.$(c_AROBJ): $(ARCDEPS)
$(c_AR) cr $$@ $$^