2015-07-10 23:07:07 +02:00
|
|
|
BSP_PATH=$(CONTIKI)/platform/galileo/bsp
|
|
|
|
LIBC_PATH=$(BSP_PATH)/libc
|
|
|
|
LIBC=$(LIBC_PATH)/i586-elf
|
2015-07-01 21:43:42 +02:00
|
|
|
LIBGCC_PATH = /usr/lib/gcc/$(shell gcc -dumpmachine)/$(shell gcc -dumpversion)
|
|
|
|
|
2015-07-08 01:40:21 +02:00
|
|
|
CONTIKI_TARGET_DIRS = . core/sys/ drivers/ net/
|
2015-07-01 21:43:42 +02:00
|
|
|
CONTIKI_TARGET_MAIN = ${addprefix $(OBJECTDIR)/,contiki-main.o}
|
2016-08-23 01:54:49 +02:00
|
|
|
CONTIKI_SOURCEFILES += contiki-main.c clock.c rtimer-arch.c eth-proc.c eth-conf.c galileo-gpio.c
|
|
|
|
|
|
|
|
GALILEO_GEN ?= 2
|
|
|
|
CFLAGS += -DGALILEO_GEN=$(GALILEO_GEN)
|
|
|
|
CONTIKI_SOURCEFILES += galileo-gen$(GALILEO_GEN)-pinmux.c
|
|
|
|
|
|
|
|
ifeq ($(GALILEO_GEN),2)
|
|
|
|
CONTIKI_SOURCEFILES += gpio-pcal9535a.c pwm-pca9685.c
|
|
|
|
else
|
|
|
|
CONTIKI_SOURCEFILES += cy8c9540a.c
|
|
|
|
endif
|
2015-07-08 01:40:21 +02:00
|
|
|
|
|
|
|
ifeq ($(CONTIKI_WITH_IPV6),1)
|
2016-08-01 02:03:42 +02:00
|
|
|
CONTIKI_SOURCEFILES += nbr-table.c packetbuf.c linkaddr.c link-stats.c
|
2015-07-08 01:40:21 +02:00
|
|
|
endif
|
2015-07-13 23:54:24 +02:00
|
|
|
|
|
|
|
PROJECT_SOURCEFILES += newlib-syscalls.c
|
2015-07-01 21:43:42 +02:00
|
|
|
|
|
|
|
CONTIKI_CPU=$(CONTIKI)/cpu/x86
|
2015-04-29 19:58:29 +02:00
|
|
|
include $(CONTIKI)/cpu/x86/Makefile.x86_quarkX1000
|
2015-07-01 21:43:42 +02:00
|
|
|
|
2015-12-15 23:10:42 +01:00
|
|
|
CFLAGS += -fno-stack-protector -I$(LIBC)/include
|
|
|
|
ifeq (clang,$(findstring clang,$(CC)))
|
|
|
|
CFLAGS += -nostdlibinc
|
|
|
|
else
|
|
|
|
CFLAGS += -nostdinc -isystem $(LIBGCC_PATH)/include -isystem $(LIBGCC_PATH)/include-fixed
|
|
|
|
endif
|
2015-07-14 16:22:31 +02:00
|
|
|
LDFLAGS += -nostdlib -L$(LIBC)/lib -L$(LIBGCC_PATH)/32
|
|
|
|
|
|
|
|
TARGET_LIBFILES += -lm -lc -lgcc
|
2015-07-01 21:43:42 +02:00
|
|
|
|
2015-07-10 23:07:07 +02:00
|
|
|
-include $(LIBC_PATH)/Makefile.libc
|
|
|
|
|
|
|
|
ifndef BUILT_LIBC
|
|
|
|
$(error Build the C library by executing $(LIBC_PATH)/build_newlib.sh)
|
|
|
|
endif
|