PROJECTDIR now turned into modules via MODULES_REL

This commit is contained in:
Simon Duquennoy 2017-12-19 05:29:55 -08:00
parent a0961ac2a1
commit 81d1b1bd80
17 changed files with 26 additions and 32 deletions

View File

@ -57,11 +57,7 @@ MODULES += os os/net os/net/mac os/storage
oname = ${patsubst %.c,%.o,${patsubst %.S,%.o,$(1)}} oname = ${patsubst %.c,%.o,${patsubst %.S,%.o,$(1)}}
CONTIKI_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(CONTIKI_SOURCEFILES)}} CONTIKI_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(CONTIKI_SOURCEFILES)}}
PROJECT_SOURCEFILES += ${foreach d, $(PROJECTDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}}
PROJECT_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(PROJECT_SOURCEFILES)}} PROJECT_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(PROJECT_SOURCEFILES)}}
PROJECT_INCLUDES = ${strip ${wildcard ${foreach d, $(PROJECTDIRS), $(d)/Makefile.${notdir $(d)}}}}
-include $(PROJECT_INCLUDES)
# Provide way to create $(OBJECTDIR) if it has been removed by make clean # Provide way to create $(OBJECTDIR) if it has been removed by make clean
$(OBJECTDIR): $(OBJECTDIR):
@ -166,14 +162,12 @@ else
CFLAGS += -DUIP_CONF_IPV6_RPL=0 CFLAGS += -DUIP_CONF_IPV6_RPL=0
endif endif
ifdef MODULES MODULEDIRS = $(MODULES_REL) ${wildcard ${addprefix $(CONTIKI)/, $(MODULES)}}
UNIQUEMODULES = $(call uniq,$(MODULES)) UNIQUEMODULES = $(call uniq,$(MODULEDIRS))
MODULEDIRS = ${wildcard ${addprefix $(CONTIKI)/, $(UNIQUEMODULES)}} MODULES_SOURCES = ${foreach d, $(MODULEDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}}
MODULES_SOURCES = ${foreach d, $(MODULEDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}} MODULES_INCLUDES = ${wildcard ${foreach d, $(MODULEDIRS), $(d)/Makefile.${notdir $(d)}}}
MODULES_INCLUDES = ${wildcard ${foreach d, $(MODULEDIRS), $(d)/Makefile.${notdir $(d)}}} include $(MODULES_INCLUDES)
include $(MODULES_INCLUDES) CONTIKI_SOURCEFILES += $(MODULES_SOURCES)
CONTIKI_SOURCEFILES += $(MODULES_SOURCES)
endif
### Verbosity control. Use make V=1 to get verbose builds. ### Verbosity control. Use make V=1 to get verbose builds.

View File

@ -6,7 +6,7 @@ endif
STRUCTGEN = structgen STRUCTGEN = structgen
PROJECTDIRS += $(BUILTSRCDIR) MODULES_REL += $(BUILTSRCDIR)
USB_STRING_DESCRIPTORS ?= $(CONTIKI_CPU_ARM)/common/usb/cdc-acm/string-descriptors.xml USB_STRING_DESCRIPTORS ?= $(CONTIKI_CPU_ARM)/common/usb/cdc-acm/string-descriptors.xml

View File

@ -6,9 +6,9 @@ CONTIKI=../..
# build RESTful resources # build RESTful resources
include $(CONTIKI)/Makefile.identify-target include $(CONTIKI)/Makefile.identify-target
ifeq ($(TARGET),native) ifeq ($(TARGET),native)
PROJECTDIRS += ./resources-plugtest MODULES_REL += ./resources-plugtest
endif endif
PROJECTDIRS += ./resources MODULES_REL += ./resources
# Include the CoAP implementation # Include the CoAP implementation
MODULES += os/net/app-layer/coap MODULES += os/net/app-layer/coap

View File

@ -1,6 +1,6 @@
all: cc26xx-web-demo all: cc26xx-web-demo
PROJECTDIRS += ./resources MODULES_REL += ./resources
PROJECT_SOURCEFILES += cetic-6lbr-client.c coap-server.c net-uart.c mqtt-client.c PROJECT_SOURCEFILES += cetic-6lbr-client.c coap-server.c net-uart.c mqtt-client.c
PROJECT_SOURCEFILES += httpd-simple.c PROJECT_SOURCEFILES += httpd-simple.c

View File

@ -8,7 +8,7 @@ CONTIKI=../../../../..
MAKE_MAC = MAKE_MAC_TSCH MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/lib/json MODULES += os/lib/json
PROJECTDIRS += .. ../tools MODULES_REL += .. ../tools
MODULES += os/net/app-layer/coap MODULES += os/net/app-layer/coap

View File

@ -8,7 +8,7 @@ CONTIKI=../../../../..
MAKE_MAC = MAKE_MAC_TSCH MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/lib/json MODULES += os/lib/json
PROJECTDIRS += .. ../tools MODULES_REL += .. ../tools
MODULES += os/net/app-layer/coap MODULES += os/net/app-layer/coap

View File

@ -8,7 +8,7 @@ CONTIKI=../../../../..
MAKE_MAC = MAKE_MAC_TSCH MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/lib/json MODULES += os/lib/json
PROJECTDIRS += .. ../tools MODULES_REL += .. ../tools
MODULES += os/net/app-layer/coap MODULES += os/net/app-layer/coap

View File

@ -6,6 +6,6 @@ TARGET ?= jn516x
CONTIKI=../../../../.. CONTIKI=../../../../..
MAKE_MAC = MAKE_MAC_TSCH MAKE_MAC = MAKE_MAC_TSCH
PROJECTDIRS += .. ../tools MODULES_REL += .. ../tools
include $(CONTIKI)/Makefile.include include $(CONTIKI)/Makefile.include

View File

@ -5,7 +5,7 @@ JN516x_WITH_DONGLE = 1
CONTIKI=../../../../../.. CONTIKI=../../../../../..
PROJECTDIRS += .. ../../tools MODULES_REL += .. ../../tools
MAKE_MAC = MAKE_MAC_TSCH MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/net/app-layer/coap MODULES += os/net/app-layer/coap
MODULES += os/services/orchestra os/lib/json MODULES += os/services/orchestra os/lib/json

View File

@ -5,7 +5,7 @@ JN516x_WITH_DONGLE = 1
CONTIKI=../../../../../.. CONTIKI=../../../../../..
PROJECTDIRS += .. ../../tools MODULES_REL += .. ../../tools
MAKE_MAC = MAKE_MAC_TSCH MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/net/app-layer/coap MODULES += os/net/app-layer/coap

View File

@ -7,7 +7,7 @@ CONTIKI=../../../../../..
PROJECT_SOURCEFILES += slip-bridge.c slip.c PROJECT_SOURCEFILES += slip-bridge.c slip.c
PROJECTDIRS += .. ../../tools MODULES_REL += .. ../../tools
MAKE_MAC = MAKE_MAC_TSCH MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/net/app-layer/coap MODULES += os/net/app-layer/coap

View File

@ -6,7 +6,7 @@ TARGET_WITH_UART1 = 1
CONTIKI=../../../../.. CONTIKI=../../../../..
PROJECTDIRS += .. ../tools MODULES_REL += .. ../tools
MAKE_MAC = MAKE_MAC_TSCH MAKE_MAC = MAKE_MAC_TSCH
MODULES += os/net/app-layer/coap MODULES += os/net/app-layer/coap

View File

@ -16,7 +16,7 @@ CFLAGS += -DDEVICE_NAME=\"nRF52-DK-CoAP-Server\"
endif endif
# automatically build RESTful resources # automatically build RESTful resources
PROJECTDIRS += ./resources MODULES_REL += ./resources
# REST Engine shall use Erbium CoAP implementation # REST Engine shall use Erbium CoAP implementation
MODULES += os/net/app-layer/coap MODULES += os/net/app-layer/coap

View File

@ -5,14 +5,14 @@ CONTIKI = ../..
include $(CONTIKI)/Makefile.identify-target include $(CONTIKI)/Makefile.identify-target
ifeq ($(TARGET),native) ifeq ($(TARGET),native)
PROJECTDIRS += native MODULES_REL += native
CFLAGS += -DPROJECT_CONF_PATH=\"native/project-conf.h\" CFLAGS += -DPROJECT_CONF_PATH=\"native/project-conf.h\"
else else
PROJECTDIRS += embedded MODULES_REL += embedded
# For embedded platforms, include platform-specific directory # For embedded platforms, include platform-specific directory
PROJECTDIRS += embedded/$(TARGET) MODULES_REL += embedded/$(TARGET)
CFLAGS += -DPROJECT_CONF_PATH=\"embedded/project-conf.h\" CFLAGS += -DPROJECT_CONF_PATH=\"embedded/project-conf.h\"
endif endif
PROJECTDIRS += common MODULES_REL += common
include $(CONTIKI)/Makefile.include include $(CONTIKI)/Makefile.include

View File

@ -2,7 +2,7 @@ CONTIKI_PROJECT = sensniff
CONTIKI = ../.. CONTIKI = ../..
PROJECT_SOURCEFILES += sensniff-mac.c netstack.c PROJECT_SOURCEFILES += sensniff-mac.c netstack.c
PROJECTDIRS += pool $(TARGET) MODULES_REL += pool $(TARGET)
include $(CONTIKI)/Makefile.identify-target include $(CONTIKI)/Makefile.identify-target

View File

@ -5,7 +5,7 @@ MODULES += os/services/slip-cmd
CONTIKI=../.. CONTIKI=../..
include $(CONTIKI)/Makefile.identify-target include $(CONTIKI)/Makefile.identify-target
PROJECTDIRS += $(TARGET) MODULES_REL += $(TARGET)
PROJECT_SOURCEFILES += slip-net.c PROJECT_SOURCEFILES += slip-net.c
# custom net layer, but with IPv6 enabled # custom net layer, but with IPv6 enabled

View File

@ -12,7 +12,7 @@ ifndef TARGET
TARGET=sky TARGET=sky
endif endif
PROJECTDIRS = dev MODULES_REL += dev
PROJECT_SOURCEFILES = fakeuip.c sicslow_ethernet.c PROJECT_SOURCEFILES = fakeuip.c sicslow_ethernet.c
all: uip6-bridge-tap.sky all: uip6-bridge-tap.sky