65 lines
2.0 KiB
Makefile
65 lines
2.0 KiB
Makefile
ifndef CONTIKI
|
|
$(error CONTIKI not defined! You must specify where CONTIKI resides!)
|
|
endif
|
|
|
|
ifdef SEEDEYE_ID
|
|
CFLAGS += -DSEEDEYE_ID=${SEEDEYE_ID}
|
|
endif
|
|
|
|
CONTIKI_TARGET_DIRS = . dev dev/mrf24j40 apps net
|
|
CONTIKI_TARGET_MAIN = ${addprefix $(OBJECTDIR)/,contiki-main.o}
|
|
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER__
|
|
|
|
ifndef PIC32_TIMER_CLOCK
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER_1__ -D PIC32_TIMER_CLOCK=1
|
|
endif
|
|
ifeq ($(PIC32_TIMER_CLOCK),1)
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER_1__ -D PIC32_TIMER_CLOCK=1
|
|
endif
|
|
ifeq ($(PIC32_TIMER_CLOCK),2)
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER_2__ -D PIC32_TIMER_CLOCK=2
|
|
endif
|
|
ifeq ($(PIC32_TIMER_CLOCK),3)
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER_3__ -D PIC32_TIMER_CLOCK=3
|
|
endif
|
|
ifeq ($(PIC32_TIMER_CLOCK),4)
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER_4__ -D PIC32_TIMER_CLOCK=4
|
|
endif
|
|
ifeq ($(PIC32_TIMER_CLOCK),5)
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER_5__ -D PIC32_TIMER_CLOCK=5
|
|
endif
|
|
|
|
ifndef PIC32_TIMER_RTIMER
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER_23__ -D PIC32_TIMER_RTIMER=23
|
|
endif
|
|
ifeq ($(PIC32_TIMER_RTIMER),23)
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER_23__ -D PIC32_TIMER_RTIMER=23
|
|
endif
|
|
ifeq ($(PIC32_TIMER_RTIMER),45)
|
|
CONTIKI_PLAT_DEFS += -D __USE_TIMER_45__ -D PIC32_TIMER_RTIMER=45
|
|
endif
|
|
|
|
CONTIKI_PLAT_DEFS += -D __USE_UART__
|
|
CONTIKI_PLAT_DEFS += -D __USE_UART_PORT1A__
|
|
CONTIKI_PLAT_DEFS += -D __USE_UART_PORT1B__
|
|
CONTIKI_PLAT_DEFS += -D __USE_SPI__
|
|
CONTIKI_PLAT_DEFS += -D __USE_SPI_PORT3A__
|
|
CONTIKI_PLAT_DEFS += -D __USE_MRF24J40_SPI_PORT_3A__
|
|
CONTIKI_PLAT_DEFS += -D __USE_UART_PORT1A_FOR_SLIP__
|
|
CONTIKI_PLAT_DEFS += -D __USE_UART_PORT1B_FOR_DEBUG__
|
|
CONTIKI_PLAT_DEFS += -D MRF24J40MB -D ADD_RSSI_AND_LQI_TO_PACKET
|
|
|
|
CONTIKI_CORE_SOURCEFILES = leds.c sensors.c slip.c
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += contiki-seedeye-main.c init-net.c leds-arch.c battery-sensor.c button-sensor.c radio-sensor.c
|
|
CONTIKI_TARGET_SOURCEFILES += mrf24j40.c
|
|
CONTIKI_TARGET_SOURCEFILES += $(CONTIKI_CORE_SOURCEFILES)
|
|
|
|
CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
|
|
|
include $(CONTIKI)/cpu/pic32/Makefile.pic32
|
|
|
|
MODULES += core/net core/net/mac core/net/rime core/net/llsec
|
|
|