2010-03-02 23:40:39 +01:00
|
|
|
# $Id: Makefile.esb,v 1.15 2010/03/02 22:40:39 nifi Exp $
|
2006-06-18 00:41:10 +02:00
|
|
|
|
|
|
|
SENSORS = sensors.c irq.c button-sensor.c pir-sensor.c vib-sensor.c \
|
|
|
|
sound-sensor.c radio-sensor.c ctsrts-sensor.c battery-sensor.c \
|
|
|
|
temperature-sensor.c
|
2010-03-02 23:40:39 +01:00
|
|
|
ESB = ir.c beep.c ds1629.c tr1001-gcr.c gcr.c \
|
|
|
|
esb-sensors.c node-id.c eeprom.c \
|
|
|
|
uip-driver.c uip-ipchksum.c
|
2008-07-11 17:27:57 +02:00
|
|
|
CFS_EEPROM = cfs-eeprom.c
|
|
|
|
CFS_COFFEE = cfs-coffee.c cfs-coffee-arch.c
|
|
|
|
|
2006-06-18 00:41:10 +02:00
|
|
|
CONTIKI_TARGET_DIRS = . dev apps net loader
|
2006-10-06 09:58:19 +02:00
|
|
|
ifndef CONTIKI_TARGET_MAIN
|
2010-03-02 23:40:39 +01:00
|
|
|
CONTIKI_TARGET_MAIN = contiki-esb-main.c
|
2006-10-06 09:58:19 +02:00
|
|
|
endif
|
2006-06-18 00:41:10 +02:00
|
|
|
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += $(SENSORS) $(ESB) \
|
|
|
|
contiki-esb-default-init-lowlevel.c \
|
2007-06-01 14:46:07 +02:00
|
|
|
contiki-esb-default-init-apps.c \
|
2012-03-07 23:03:15 +01:00
|
|
|
rs232.c rs232-putchar.c fader.c
|
2010-02-09 08:34:37 +01:00
|
|
|
|
|
|
|
ifdef WITH_CODEPROP
|
2010-03-02 23:40:39 +01:00
|
|
|
CONTIKI_TARGET_DIRS += ../../apps/codeprop
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += codeprop-tmp.c
|
|
|
|
WITH_UIP=1
|
2010-02-09 08:34:37 +01:00
|
|
|
endif
|
|
|
|
|
2011-09-26 10:38:41 +02:00
|
|
|
ifdef GCC
|
|
|
|
CFLAGS+=-Os -g
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef IAR
|
2012-03-07 23:03:15 +01:00
|
|
|
CFLAGS += -D__MSP430F149__=1 -e --vla -Ohz --multiplier=16s --core=430 --double=32
|
2011-09-26 10:38:41 +02:00
|
|
|
CFLAGSNO = --dlib_config "$(IAR_PATH)/LIB/DLIB/dl430fn.h" $(CFLAGSWERROR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2010-03-02 23:40:39 +01:00
|
|
|
ifdef WITH_UIP
|
|
|
|
ifndef WITH_SLIP
|
|
|
|
WITH_SLIP=1
|
|
|
|
endif
|
|
|
|
CFLAGS += -DWITH_UIP=1 -DWITH_SLIP=${WITH_SLIP}
|
2007-06-01 14:46:07 +02:00
|
|
|
endif
|
2006-06-18 00:41:10 +02:00
|
|
|
|
2008-07-11 17:27:57 +02:00
|
|
|
ifeq ($(CFS),coffee)
|
2010-03-02 23:40:39 +01:00
|
|
|
CONTIKI_TARGET_SOURCEFILES += $(CFS_COFFEE)
|
2008-07-11 17:27:57 +02:00
|
|
|
else
|
2010-03-02 23:40:39 +01:00
|
|
|
CONTIKI_TARGET_SOURCEFILES += $(CFS_EEPROM)
|
2008-07-11 17:27:57 +02:00
|
|
|
endif
|
|
|
|
|
2006-10-06 09:58:19 +02:00
|
|
|
include $(CONTIKI)/platform/$(TARGET)/apps/Makefile.apps
|
|
|
|
|
2012-04-10 16:05:10 +02:00
|
|
|
MCU=msp430f149
|
2006-06-18 00:41:10 +02:00
|
|
|
include $(CONTIKI)/cpu/msp430/Makefile.msp430
|
|
|
|
|
2012-03-07 23:03:15 +01:00
|
|
|
ifdef IAR
|
2012-09-19 22:49:19 +02:00
|
|
|
LDFLAGSNO += -xm "$(IAR_PATH)/lib/dlib/dl430fn.r43" -f "$(IAR_PATH)/config/lnk430f149.xcl"
|
2012-03-07 23:03:15 +01:00
|
|
|
LDFLAGS += $(LDFLAGSNO) -Felf -yn
|
|
|
|
endif # IAR
|
|
|
|
|
2006-10-06 09:58:19 +02:00
|
|
|
contiki-$(TARGET).a: ${addprefix $(OBJECTDIR)/,symbols.o}
|
2006-06-18 00:41:10 +02:00
|
|
|
# $(AR) rcf $@ $^
|
|
|
|
|
|
|
|
ifndef BASE_IP
|
|
|
|
BASE_IP := 172.16.1.1
|
|
|
|
endif
|
|
|
|
|
|
|
|
send: $(CONTIKI)/tools/codeprop.c
|
|
|
|
cc -Wall $^ -o send
|
|
|
|
|
|
|
|
%.send: %.cm send
|
|
|
|
send $(BASE_IP) $<
|
2007-03-23 17:19:41 +01:00
|
|
|
|
|
|
|
### System dependent Makefile
|
|
|
|
|
2012-02-22 00:57:22 +01:00
|
|
|
ifeq ($(HOST_OS),FreeBSD)
|
2007-03-23 17:19:41 +01:00
|
|
|
# settings for FreeBSD
|
|
|
|
-include $(CONTIKI)/platform/$(TARGET)/buildscripts/Makefile.freebsd
|
|
|
|
else
|
2012-02-22 00:57:22 +01:00
|
|
|
ifeq ($(HOST_OS),Windows)
|
|
|
|
# settings for Windows
|
|
|
|
-include $(CONTIKI)/platform/$(TARGET)/buildscripts/Makefile.win
|
|
|
|
else
|
|
|
|
# settings for an arbitary unix-like platform
|
|
|
|
-include $(CONTIKI)/platform/$(TARGET)/buildscripts/Makefile.unix
|
|
|
|
endif
|
2007-03-23 17:19:41 +01:00
|
|
|
endif
|