diff --git a/Makefile.include b/Makefile.include index 6119031a8..1633d5c66 100644 --- a/Makefile.include +++ b/Makefile.include @@ -11,13 +11,18 @@ ifeq ($(TARGET),) ifeq ($(DEFAULT_TARGET),) DEFAULT_TARGET=native endif - ${warning TARGET not defined, using target '$(DEFAULT_TARGET)'} + ${info TARGET not defined, using target '$(DEFAULT_TARGET)'} TARGET=$(DEFAULT_TARGET) else - ${warning using saved target '$(TARGET)'} + ${info using saved target '$(TARGET)'} endif endif +ifeq ($(DEFINES),) + -include Makefile.$(TARGET).defines + ${info using saved defines '$(DEFINES)'} +endif + usage: @echo "make MAKETARGETS... [TARGET=(TARGET)] [savetarget] [targets]" @@ -26,8 +31,14 @@ targets: savetarget: -@rm -f Makefile.target + @echo "saving Makefile.target" @echo >Makefile.target "TARGET = $(TARGET)" +savedefines: + -@rm -f Makefile.$(TARGET).defines + @echo "saving Makefile.$(TARGET).defines" + @echo >Makefile.$(TARGET).defines "DEFINES = $(DEFINES)" + ifeq (${wildcard $(OBJECTDIR)},) DUMMY := ${shell mkdir $(OBJECTDIR)} endif