Merge pull request #122 from g-oikonomou/contrib/target-identification
Move target identification code to separate Makefile
This commit is contained in:
commit
0ce1657653
9
Makefile.identify-target
Normal file
9
Makefile.identify-target
Normal file
@ -0,0 +1,9 @@
|
||||
ifeq ($(TARGET),)
|
||||
-include Makefile.target
|
||||
ifeq ($(TARGET),)
|
||||
${info TARGET not defined, using target 'native'}
|
||||
TARGET=native
|
||||
else
|
||||
${info using saved target '$(TARGET)'}
|
||||
endif
|
||||
endif
|
@ -8,15 +8,7 @@ endif
|
||||
# Setting this option is also important for tests on Cooja motes to check for warnings.
|
||||
WERROR ?= 1
|
||||
|
||||
ifeq ($(TARGET),)
|
||||
-include Makefile.target
|
||||
ifeq ($(TARGET),)
|
||||
${info TARGET not defined, using target 'native'}
|
||||
TARGET=native
|
||||
else
|
||||
${info using saved target '$(TARGET)'}
|
||||
endif
|
||||
endif
|
||||
include $(CONTIKI)/Makefile.identify-target
|
||||
|
||||
ifeq ($(DEFINES),)
|
||||
-include Makefile.$(TARGET).defines
|
||||
|
@ -1,15 +1,10 @@
|
||||
CONTIKI_PROJECT = sensniff
|
||||
CONTIKI = ../..
|
||||
|
||||
PROJECT_SOURCEFILES += sensniff-mac.c netstack.c
|
||||
PROJECTDIRS += pool $(TARGET)
|
||||
|
||||
ifeq ($(TARGET),)
|
||||
-include Makefile.target
|
||||
ifeq ($(TARGET),)
|
||||
TARGET=srf06-cc26xx
|
||||
$(info TARGET not defined, using target $(TARGET))
|
||||
endif
|
||||
endif
|
||||
-include $(CONTIKI)/Makefile.identify-target
|
||||
|
||||
### Optionally, the target can add its own Makefile, to do things like e.g.
|
||||
### add more source files to the build or define make variables.
|
||||
@ -19,7 +14,6 @@ all: $(CONTIKI_PROJECT)
|
||||
|
||||
# use a custom MAC driver: sensniff_mac_driver
|
||||
MAKE_MAC = MAKE_MAC_OTHER
|
||||
CONTIKI = ../..
|
||||
include $(CONTIKI)/Makefile.include
|
||||
|
||||
PYTHON ?= python
|
||||
|
Loading…
Reference in New Issue
Block a user