2006-06-18 00:41:10 +02:00
|
|
|
ifndef CONTIKI
|
|
|
|
$(error CONTIKI not defined! You must specify where CONTIKI resides!)
|
|
|
|
endif
|
|
|
|
|
|
|
|
#contiki: contiki-$(TARGET).a
|
|
|
|
|
|
|
|
CONTIKI_TARGET_DIRS = . dev apps net
|
|
|
|
|
|
|
|
SENSORS = sensors.c beep.c button-sensor.c pir-sensor.c vib-sensor.c \
|
2006-10-06 10:25:30 +02:00
|
|
|
radio-sensor.c irq.c eeprom.c \
|
2006-06-18 00:41:10 +02:00
|
|
|
dummy-sensors.c leds.c leds-arch.c esb-sensors.c
|
2007-04-01 23:05:17 +02:00
|
|
|
NETSIM = ether.c ethernode.c ethernode-uip.c lpm.c rs232.c flash.c \
|
2006-06-18 00:41:10 +02:00
|
|
|
node.c nodes.c sensor.c display.c random.c radio.c \
|
2007-03-13 14:07:47 +01:00
|
|
|
dlloader.c main.c netsim-init.c contiki-main.c symtab.c symbols.c tr1001.c tr1001-drv.c \
|
2007-04-01 23:05:17 +02:00
|
|
|
ethernode-rime.c
|
2006-06-18 00:41:10 +02:00
|
|
|
|
2007-04-01 23:05:17 +02:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
CONTIKI_TARGET_SOURCEFILES = $(NETSIM) $(SENSORS) wpcap-service.c wpcap.c
|
|
|
|
else
|
|
|
|
CONTIKI_TARGET_SOURCEFILES = $(NETSIM) $(SENSORS) tapdev-service.c tapdev.c
|
|
|
|
endif
|
2006-06-18 00:41:10 +02:00
|
|
|
|
|
|
|
CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
|
|
|
|
### Define the CPU directory
|
2007-03-28 22:14:59 +02:00
|
|
|
CONTIKI_CPU=$(CONTIKI)/cpu/native
|
|
|
|
include $(CONTIKI)/cpu/native/Makefile.native
|
2006-06-18 00:41:10 +02:00
|
|
|
|
|
|
|
### Compiler definitions
|
2007-03-30 00:23:49 +02:00
|
|
|
CFLAGS += `gtk-config --cflags` -DNETSIM=1
|
2007-03-23 13:23:38 +01:00
|
|
|
TARGET_LIBFILES = `gtk-config --libs`
|
2006-06-18 00:41:10 +02:00
|
|
|
|
2007-04-01 23:05:17 +02:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
TARGET_LIBFILES += /lib/w32api/libws2_32.a /lib/w32api/libiphlpapi.a
|
|
|
|
endif
|
|
|
|
|
2006-06-18 00:41:10 +02:00
|
|
|
### Setup directory search path for source files
|
|
|
|
|
|
|
|
CONTIKI_TARGET_DIRS_CONCAT = ${addprefix $(CONTIKI)/platform/$(TARGET)/, \
|
|
|
|
$(CONTIKI_TARGET_DIRS)}
|
|
|
|
vpath %.c $(PROJECTDIRS) \
|
|
|
|
$(CONTIKIDIRS) $(APPDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) \
|
|
|
|
$(CONTIKI_CPU)
|
|
|
|
|
|
|
|
### Compilation rules
|