Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected.
Setting UIP_CONF_IPV6 to zero from the make build command line is something that seems like it should ensure that IPv6 is disabled, but in fact it actually *enables* IPv6. This seems counter intuitive, so this patch changes the behavior of the makefiles to handle this case properly.
This commit is contained in:
parent
0a88373add
commit
5afcbf6fff
@ -51,7 +51,7 @@ OBJECTDIR = obj_$(TARGET)
|
|||||||
|
|
||||||
LOWERCASE = -abcdefghijklmnopqrstuvwxyz
|
LOWERCASE = -abcdefghijklmnopqrstuvwxyz
|
||||||
UPPERCASE = _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
|
CFLAGS += -DCONTIKI=1 -DCONTIKI_TARGET_$(TARGET_UPPERCASE)=1
|
||||||
|
|
||||||
include $(CONTIKI)/core/net/rime/Makefile.rime
|
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
|
DEV = nullradio.c
|
||||||
NET = netstack.c uip-debug.c packetbuf.c queuebuf.c packetqueue.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
|
CFLAGS += -DUIP_CONF_IPV6=1
|
||||||
UIP = uip6.c tcpip.c psock.c uip-udp-packet.c uip-split.c \
|
UIP = uip6.c tcpip.c psock.c uip-udp-packet.c uip-split.c \
|
||||||
resolv.c tcpdump.c uiplib.c simple-udp.c
|
resolv.c tcpdump.c uiplib.c simple-udp.c
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
#RIME_UIP6 = rime-udp.c
|
#RIME_UIP6 = rime-udp.c
|
||||||
RIME_BASE = rimeaddr.c timesynch.c rimestats.c
|
RIME_BASE = rimeaddr.c timesynch.c rimestats.c
|
||||||
else
|
else
|
||||||
|
@ -19,7 +19,7 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
|||||||
|
|
||||||
CLEAN += *.cc2530dk
|
CLEAN += *.cc2530dk
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CONTIKI_TARGET_SOURCEFILES += viztool.c
|
CONTIKI_TARGET_SOURCEFILES += viztool.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ CONTIKI_CPU=$(CONTIKI)/cpu/x86
|
|||||||
CFLAGSNO = $(EXTRA_CC_ARGS) -Wall -g -I/usr/local/include -DCLASSNAME=$(CLASSNAME)
|
CFLAGSNO = $(EXTRA_CC_ARGS) -Wall -g -I/usr/local/include -DCLASSNAME=$(CLASSNAME)
|
||||||
CFLAGS += $(CFLAGSNO)
|
CFLAGS += $(CFLAGSNO)
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
ifdef WITH_UIP
|
ifdef WITH_UIP
|
||||||
@ -81,7 +81,7 @@ ifdef WITH_UIP
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
## Copied from Makefile.include, since Cooja overrides CFLAGS et al
|
## Copied from Makefile.include, since Cooja overrides CFLAGS et al
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DUIP_CONF_IPV6=1
|
CFLAGS += -DUIP_CONF_IPV6=1
|
||||||
ifneq ($(UIP_CONF_RPL),0)
|
ifneq ($(UIP_CONF_RPL),0)
|
||||||
CFLAGS += -DUIP_CONF_IPV6_RPL=1
|
CFLAGS += -DUIP_CONF_IPV6_RPL=1
|
||||||
|
@ -14,7 +14,7 @@ CONTIKI_PLAT_DEFS =
|
|||||||
|
|
||||||
MCU=arm7tdmi-s
|
MCU=arm7tdmi-s
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ ifndef CONTIKI_TARGET_MAIN
|
|||||||
CONTIKI_TARGET_MAIN = contiki-exp5438-main.c
|
CONTIKI_TARGET_MAIN = contiki-exp5438-main.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ ifneq ($(strip $(HAVE_PRGBOARD_FILE)), )
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
include $(CONTIKIAVR)/radio/Makefile.radio
|
include $(CONTIKIAVR)/radio/Makefile.radio
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ ifndef CONTIKI_TARGET_MAIN
|
|||||||
CONTIKI_TARGET_MAIN = contiki-main.c board-mb851.c
|
CONTIKI_TARGET_MAIN = contiki-main.c board-mb851.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ ifndef CONTIKI_TARGET_MAIN
|
|||||||
CONTIKI_TARGET_MAIN = contiki-main.c led.c button.c board.c board-mbxxx.c
|
CONTIKI_TARGET_MAIN = contiki-main.c led.c button.c board.c board-mbxxx.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ CONTIKI_TARGET_SOURCEFILES += wpcap-drv.c wpcap.c
|
|||||||
else
|
else
|
||||||
CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c
|
CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c
|
||||||
#math
|
#math
|
||||||
ifndef UIP_CONF_IPV6
|
ifneq ($(UIP_CONF_IPV6),1)
|
||||||
CONTIKI_TARGET_SOURCEFILES += tapdev.c
|
CONTIKI_TARGET_SOURCEFILES += tapdev.c
|
||||||
else
|
else
|
||||||
CONTIKI_TARGET_SOURCEFILES += tapdev6.c
|
CONTIKI_TARGET_SOURCEFILES += tapdev6.c
|
||||||
|
@ -6,7 +6,7 @@ ifeq ($(HOST_OS),Darwin)
|
|||||||
AROPTS = rc
|
AROPTS = rc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ TARGET_LIBFILES = /lib/w32api/libws2_32.a /lib/w32api/libiphlpapi.a
|
|||||||
else
|
else
|
||||||
CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c
|
CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c
|
||||||
#math
|
#math
|
||||||
ifndef UIP_CONF_IPV6
|
ifneq ($(UIP_CONF_IPV6),1)
|
||||||
CONTIKI_TARGET_SOURCEFILES += tapdev.c
|
CONTIKI_TARGET_SOURCEFILES += tapdev.c
|
||||||
else
|
else
|
||||||
CONTIKI_TARGET_SOURCEFILES += tapdev6.c
|
CONTIKI_TARGET_SOURCEFILES += tapdev6.c
|
||||||
|
@ -13,7 +13,7 @@ CONTIKI_PLAT_DEFS =
|
|||||||
|
|
||||||
MCU=arm7tdmi-s
|
MCU=arm7tdmi-s
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ CONTIKI_PLAT_DEFS =
|
|||||||
|
|
||||||
MCU=arm7tdmi-s
|
MCU=arm7tdmi-s
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ ifdef SEEDEYE_ID
|
|||||||
CFLAGS += -DSEEDEYE_ID=${SEEDEYE_ID}
|
CFLAGS += -DSEEDEYE_ID=${SEEDEYE_ID}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
|||||||
|
|
||||||
CLEAN += *.sensinode
|
CLEAN += *.sensinode
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
ifeq ($(OFFSET_FIRMWARE),1)
|
ifeq ($(OFFSET_FIRMWARE),1)
|
||||||
CFLAGS += -DDISCO_ENABLED=1
|
CFLAGS += -DDISCO_ENABLED=1
|
||||||
CONTIKI_TARGET_SOURCEFILES += disco.c
|
CONTIKI_TARGET_SOURCEFILES += disco.c
|
||||||
|
@ -10,7 +10,7 @@ ifndef CONTIKI_TARGET_MAIN
|
|||||||
CONTIKI_TARGET_MAIN = contiki-sky-main.c
|
CONTIKI_TARGET_MAIN = contiki-sky-main.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ ifndef CONTIKI_TARGET_MAIN
|
|||||||
CONTIKI_TARGET_MAIN = contiki-wismote-main.c
|
CONTIKI_TARGET_MAIN = contiki-wismote-main.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ ifndef CONTIKI_TARGET_MAIN
|
|||||||
CONTIKI_TARGET_MAIN = contiki-z1-main.c
|
CONTIKI_TARGET_MAIN = contiki-z1-main.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef UIP_CONF_IPV6
|
ifeq ($(UIP_CONF_IPV6),1)
|
||||||
CFLAGS += -DWITH_UIP6=1
|
CFLAGS += -DWITH_UIP6=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user