diff options
Diffstat (limited to 'make/main.cfg')
-rw-r--r-- | make/main.cfg | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/make/main.cfg b/make/main.cfg index dc4f00b6c3..072b1360c3 100644 --- a/make/main.cfg +++ b/make/main.cfg @@ -7,6 +7,14 @@ # # +# Initial target for make(1) +# Once this is established we can safely include other targets +# within this make-include file. +# + +default_target: all + +# # where things are relative to PROJECT_ROOT; shouldn't need to change, # but could be overridden in custom files. # @@ -16,29 +24,28 @@ PROJECT_BIN=$(PROJECT_ROOT)/bin PROJECT_INCLUDE=$(PROJECT_RELEASE)/lib/include PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools -# -# Target architecture; may be changed as per 'make "ARCH=debug"' -# This is where the object files get put. -# +## translate VARIANT into VARIANT_V +VARIANT = OPTIMIZE -ifeq ($(VARIANT),) -ARCH=o-optimize -VARIANT= -else -ifeq ($(VARIANT),DEBUG) -ARCH=o-debug -VARIANT=DEBUG -endif -endif +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE -# -# Initial target for make(1) -# Once this is established we can safely include other targets -# within this make-include file. -# +VARIANT_V = $(VARIANT_$(VARIANT)_V) -default_target: all +## Setup the variant build subdirectory +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +$(ARCH): + test -d ${ARCH} || mkdir $(ARCH) # # Default makefile name # May be overridden by command line macro assignment @@ -64,9 +71,6 @@ RECURSE_TARGETS=all depend install \ preinstall-recursive \ $(TARGET_VARIANTS) -${ARCH}: - test -d ${ARCH} || mkdir ${ARCH} - ifndef AUTOMAKE distclean-generic: -$(RM) .#* $(CONFIG_CLEAN_FILES) |