diff --git a/Makefile.include b/Makefile.include index b0e294b5e..7ca2a8d13 100644 --- a/Makefile.include +++ b/Makefile.include @@ -51,7 +51,7 @@ OBJECTDIR = obj_$(TARGET) LOWERCASE = -abcdefghijklmnopqrstuvwxyz UPPERCASE = _ABCDEFGHIJKLMNOPQRSTUVWXYZ -TARGET_UPPERCASE := ${strip ${shell echo $(TARGET) | sed y!$(LOWERCASE)!$(UPPERCASE)!}} +TARGET_UPPERCASE := ${strip ${shell echo $(TARGET) | sed 'y!$(LOWERCASE)!$(UPPERCASE)!'}} CFLAGS += -DCONTIKI=1 -DCONTIKI_TARGET_$(TARGET_UPPERCASE)=1 include $(CONTIKI)/core/net/rime/Makefile.rime @@ -64,7 +64,7 @@ LIBS = memb.c mmem.c timer.c list.c etimer.c ctimer.c energest.c rtimer.c sti DEV = nullradio.c NET = netstack.c uip-debug.c packetbuf.c queuebuf.c packetqueue.c -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DUIP_CONF_IPV6=1 UIP = uip6.c tcpip.c psock.c uip-udp-packet.c uip-split.c \ resolv.c tcpdump.c uiplib.c simple-udp.c diff --git a/core/net/rime/Makefile.rime b/core/net/rime/Makefile.rime index e45e0c391..c99faa3d5 100644 --- a/core/net/rime/Makefile.rime +++ b/core/net/rime/Makefile.rime @@ -1,4 +1,4 @@ -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) #RIME_UIP6 = rime-udp.c RIME_BASE = rimeaddr.c timesynch.c rimestats.c else diff --git a/platform/cc2530dk/Makefile.cc2530dk b/platform/cc2530dk/Makefile.cc2530dk index 83bbffeb7..655679d66 100644 --- a/platform/cc2530dk/Makefile.cc2530dk +++ b/platform/cc2530dk/Makefile.cc2530dk @@ -19,7 +19,7 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) CLEAN += *.cc2530dk -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CONTIKI_TARGET_SOURCEFILES += viztool.c endif diff --git a/platform/cooja/Makefile.cooja b/platform/cooja/Makefile.cooja index d40bfb0a2..2e61093d4 100644 --- a/platform/cooja/Makefile.cooja +++ b/platform/cooja/Makefile.cooja @@ -73,7 +73,7 @@ CONTIKI_CPU=$(CONTIKI)/cpu/x86 CFLAGSNO = $(EXTRA_CC_ARGS) -Wall -g -I/usr/local/include -DCLASSNAME=$(CLASSNAME) CFLAGS += $(CFLAGSNO) -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif ifdef WITH_UIP @@ -81,7 +81,7 @@ ifdef WITH_UIP endif ## Copied from Makefile.include, since Cooja overrides CFLAGS et al -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DUIP_CONF_IPV6=1 ifneq ($(UIP_CONF_RPL),0) CFLAGS += -DUIP_CONF_IPV6_RPL=1 diff --git a/platform/econotag/Makefile.econotag b/platform/econotag/Makefile.econotag index 95c93a56b..99f837501 100644 --- a/platform/econotag/Makefile.econotag +++ b/platform/econotag/Makefile.econotag @@ -14,7 +14,7 @@ CONTIKI_PLAT_DEFS = MCU=arm7tdmi-s -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/exp5438/Makefile.exp5438 b/platform/exp5438/Makefile.exp5438 index d22f18a4a..e2a1c3297 100644 --- a/platform/exp5438/Makefile.exp5438 +++ b/platform/exp5438/Makefile.exp5438 @@ -40,7 +40,7 @@ ifndef CONTIKI_TARGET_MAIN CONTIKI_TARGET_MAIN = contiki-exp5438-main.c endif -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/iris/Makefile.iris b/platform/iris/Makefile.iris index d7ce508bb..1558857f5 100644 --- a/platform/iris/Makefile.iris +++ b/platform/iris/Makefile.iris @@ -51,7 +51,7 @@ ifneq ($(strip $(HAVE_PRGBOARD_FILE)), ) endif include $(CONTIKIAVR)/radio/Makefile.radio -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/mb851/Makefile.mb851 b/platform/mb851/Makefile.mb851 index 4b24b82b2..2c9c14da3 100644 --- a/platform/mb851/Makefile.mb851 +++ b/platform/mb851/Makefile.mb851 @@ -8,7 +8,7 @@ ifndef CONTIKI_TARGET_MAIN CONTIKI_TARGET_MAIN = contiki-main.c board-mb851.c endif -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/mbxxx/Makefile.mbxxx b/platform/mbxxx/Makefile.mbxxx index 1a35c6d9a..f6aa436a2 100644 --- a/platform/mbxxx/Makefile.mbxxx +++ b/platform/mbxxx/Makefile.mbxxx @@ -7,7 +7,7 @@ ifndef CONTIKI_TARGET_MAIN CONTIKI_TARGET_MAIN = contiki-main.c led.c button.c board.c board-mbxxx.c endif -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/minimal-net/Makefile.minimal-net b/platform/minimal-net/Makefile.minimal-net index 296d5684e..91dd1aaeb 100644 --- a/platform/minimal-net/Makefile.minimal-net +++ b/platform/minimal-net/Makefile.minimal-net @@ -16,7 +16,7 @@ CONTIKI_TARGET_SOURCEFILES += wpcap-drv.c wpcap.c else CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c #math -ifndef UIP_CONF_IPV6 +ifneq ($(UIP_CONF_IPV6),1) CONTIKI_TARGET_SOURCEFILES += tapdev.c else CONTIKI_TARGET_SOURCEFILES += tapdev6.c diff --git a/platform/native/Makefile.native b/platform/native/Makefile.native index 36368e266..60591c6a8 100644 --- a/platform/native/Makefile.native +++ b/platform/native/Makefile.native @@ -6,7 +6,7 @@ ifeq ($(HOST_OS),Darwin) AROPTS = rc endif -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif @@ -23,7 +23,7 @@ TARGET_LIBFILES = /lib/w32api/libws2_32.a /lib/w32api/libiphlpapi.a else CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c #math -ifndef UIP_CONF_IPV6 +ifneq ($(UIP_CONF_IPV6),1) CONTIKI_TARGET_SOURCEFILES += tapdev.c else CONTIKI_TARGET_SOURCEFILES += tapdev6.c diff --git a/platform/redbee-dev/Makefile.redbee-dev b/platform/redbee-dev/Makefile.redbee-dev index 04be24562..7c4f29230 100644 --- a/platform/redbee-dev/Makefile.redbee-dev +++ b/platform/redbee-dev/Makefile.redbee-dev @@ -13,7 +13,7 @@ CONTIKI_PLAT_DEFS = MCU=arm7tdmi-s -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/redbee-econotag/Makefile.redbee-econotag b/platform/redbee-econotag/Makefile.redbee-econotag index 61d809d1a..4825b508b 100644 --- a/platform/redbee-econotag/Makefile.redbee-econotag +++ b/platform/redbee-econotag/Makefile.redbee-econotag @@ -24,7 +24,7 @@ CONTIKI_PLAT_DEFS = MCU=arm7tdmi-s -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/seedeye/Makefile.seedeye b/platform/seedeye/Makefile.seedeye index 922d8868f..988e54a07 100644 --- a/platform/seedeye/Makefile.seedeye +++ b/platform/seedeye/Makefile.seedeye @@ -6,7 +6,7 @@ ifdef SEEDEYE_ID CFLAGS += -DSEEDEYE_ID=${SEEDEYE_ID} endif -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/sensinode/Makefile.sensinode b/platform/sensinode/Makefile.sensinode index a1ecf6af1..c74a70181 100644 --- a/platform/sensinode/Makefile.sensinode +++ b/platform/sensinode/Makefile.sensinode @@ -46,7 +46,7 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES) CLEAN += *.sensinode -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) ifeq ($(OFFSET_FIRMWARE),1) CFLAGS += -DDISCO_ENABLED=1 CONTIKI_TARGET_SOURCEFILES += disco.c diff --git a/platform/sky/Makefile.common b/platform/sky/Makefile.common index 212f95554..64484e1da 100644 --- a/platform/sky/Makefile.common +++ b/platform/sky/Makefile.common @@ -10,7 +10,7 @@ ifndef CONTIKI_TARGET_MAIN CONTIKI_TARGET_MAIN = contiki-sky-main.c endif -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/wismote/Makefile.wismote b/platform/wismote/Makefile.wismote index 71850bd59..a037ced0e 100644 --- a/platform/wismote/Makefile.wismote +++ b/platform/wismote/Makefile.wismote @@ -18,7 +18,7 @@ ifndef CONTIKI_TARGET_MAIN CONTIKI_TARGET_MAIN = contiki-wismote-main.c endif -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif diff --git a/platform/z1/Makefile.common b/platform/z1/Makefile.common index 72a1270d6..57536b3e2 100644 --- a/platform/z1/Makefile.common +++ b/platform/z1/Makefile.common @@ -24,7 +24,7 @@ ifndef CONTIKI_TARGET_MAIN CONTIKI_TARGET_MAIN = contiki-z1-main.c endif -ifdef UIP_CONF_IPV6 +ifeq ($(UIP_CONF_IPV6),1) CFLAGS += -DWITH_UIP6=1 endif