From b298e3c5246f27ef37f75f5705f37afd0545c90b Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Tue, 17 Mar 2009 20:08:56 +0000 Subject: [PATCH] Moved APPS inclusions to before TARGET inclusions so that the platform-specific makefile can operate on definitons made by the APPS makefiles. This reverts a change that was inadvertedly made when introducing platform-specific APPS directories --- Makefile.include | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Makefile.include b/Makefile.include index aa8179741..2a67b4007 100644 --- a/Makefile.include +++ b/Makefile.include @@ -85,19 +85,7 @@ CONTIKI_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(CONTIKI_SOURCEFI PROJECT_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(PROJECT_SOURCEFILES)}} -### Include target makefile (TODO Unsafe?) - -target_makefile := $(wildcard $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET)) - -# Check if the target makefile exists -ifeq ($(strip $(target_makefile)),) - ${error The target platform "$(TARGET)" does not exist (maybe it was misspelled?)} -else - include $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET) -endif - ### Include application makefiles - ifdef APPS APPDIRS += ${wildcard ${addprefix $(CONTIKI)/apps/, $(APPS)} \ ${addprefix $(CONTIKI)/platform/$(TARGET)/apps/, $(APPS)}} @@ -110,6 +98,16 @@ ifdef APPS CONTIKI_SOURCEFILES += $(APP_SOURCES) $(DSC_SOURCES) endif +### Include target makefile (TODO Unsafe?) +target_makefile := $(wildcard $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET)) + +# Check if the target makefile exists +ifeq ($(strip $(target_makefile)),) + ${error The target platform "$(TARGET)" does not exist (maybe it was misspelled?)} +else + include $(CONTIKI)/platform/$(TARGET)/Makefile.$(TARGET) +endif + ### Forward comma-separated list of arbitrary defines to the compiler COMMA := ,