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

This commit is contained in:
adamdunkels 2009-03-17 20:08:56 +00:00
parent 0076bfe8a5
commit b298e3c524
1 changed files with 10 additions and 12 deletions

View File

@ -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 := ,