Fixed TARGET=native compilation issues on Darwin.

This commit is contained in:
Ilya Dmitrichenko 2012-02-22 00:46:32 +00:00 committed by David Kopf
parent 860de0dd01
commit 499d3052ee
3 changed files with 14 additions and 2 deletions

View file

@ -14,7 +14,11 @@ CFLAGSWERROR=-Werror -pedantic -std=c99 -Werror
endif endif
CFLAGSNO = -Wall -g -I/usr/local/include $(CFLAGSWERROR) CFLAGSNO = -Wall -g -I/usr/local/include $(CFLAGSWERROR)
CFLAGS += $(CFLAGSNO) -O CFLAGS += $(CFLAGSNO) -O
ifeq ($(HOST_OS),Linux)
LDFLAGS = -Wl,-Map=contiki-$(TARGET).map,-export-dynamic LDFLAGS = -Wl,-Map=contiki-$(TARGET).map,-export-dynamic
else
LDFLAGS = -Wl
endif
### Compilation rules ### Compilation rules

View file

@ -10,7 +10,11 @@ OBJCOPY = objcopy
STRIP = strip STRIP = strip
CFLAGSNO = -Wall -g -I/usr/local/include CFLAGSNO = -Wall -g -I/usr/local/include
CFLAGS += $(CFLAGSNO) CFLAGS += $(CFLAGSNO)
ifeq ($(HOST_OS),Linux)
LDFLAGS = -Wl,-Map=contiki-$(TARGET).map,-export-dynamic LDFLAGS = -Wl,-Map=contiki-$(TARGET).map,-export-dynamic
else
LDFLAGS = -Wl
endif
### Compilation rules ### Compilation rules

View file

@ -2,6 +2,10 @@ ifndef CONTIKI
$(error CONTIKI not defined! You must specify where CONTIKI resides!) $(error CONTIKI not defined! You must specify where CONTIKI resides!)
endif endif
ifeq ($(HOST_OS),Darwin)
AROPTS = rc
endif
ifdef UIP_CONF_IPV6 ifdef UIP_CONF_IPV6
CFLAGS += -DWITH_UIP6=1 CFLAGS += -DWITH_UIP6=1
endif endif