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-04-29 17:51:29 +02:00
|
|
|
CONTIKI_TARGET_DIRS = . core/sys/
|
2015-07-01 21:43:42 +02:00
|
|
|
CONTIKI_TARGET_MAIN = ${addprefix $(OBJECTDIR)/,contiki-main.o}
|
2015-07-13 23:54:24 +02:00
|
|
|
CONTIKI_SOURCEFILES += contiki-main.c clock.c rtimer-arch.c
|
|
|
|
|
|
|
|
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-07-07 00:34:00 +02:00
|
|
|
CFLAGS += -fno-stack-protector -nostdinc -isystem $(LIBC)/include -isystem $(LIBGCC_PATH)/include -isystem $(LIBGCC_PATH)/include-fixed
|
|
|
|
LDFLAGS += -nostdlib
|
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
|
|
|
|
|
2015-07-01 21:43:42 +02:00
|
|
|
# Ideally, this should be part of LDFLAGS (-lc -lm etc). However, we found out that archive
|
|
|
|
# static files (.a) must be linked after our own object files, otherwise the linker gets lost
|
|
|
|
# and we get undefined references only.
|
2015-07-13 23:54:24 +02:00
|
|
|
TARGET_LIBFILES = $(LIBC)/lib/libm.a $(LIBC)/lib/libc.a $(LIBGCC_PATH)/32/libgcc.a
|