2015-07-01 16:43:42 -03:00
|
|
|
LIBC=$(CONTIKI)/platform/galileo/bsp/libc/i586-elf
|
|
|
|
LIBGCC_PATH = /usr/lib/gcc/$(shell gcc -dumpmachine)/$(shell gcc -dumpversion)
|
|
|
|
|
2015-04-29 12:51:29 -03:00
|
|
|
CONTIKI_TARGET_DIRS = . core/sys/
|
2015-07-01 16:43:42 -03:00
|
|
|
CONTIKI_TARGET_MAIN = ${addprefix $(OBJECTDIR)/,contiki-main.o}
|
2015-05-07 19:20:14 -03:00
|
|
|
CONTIKI_SOURCEFILES += contiki-main.c newlib-syscalls.c clock.c rtimer-arch.c
|
2015-07-01 16:43:42 -03:00
|
|
|
|
|
|
|
CONTIKI_CPU=$(CONTIKI)/cpu/x86
|
2015-04-29 14:58:29 -03:00
|
|
|
include $(CONTIKI)/cpu/x86/Makefile.x86_quarkX1000
|
2015-07-01 16:43:42 -03:00
|
|
|
|
2015-07-02 19:21:26 -07:00
|
|
|
CFLAGS += -m32 -march=i586 -mtune=i586 -fno-stack-protector -nostdinc -isystem $(LIBC)/include -isystem $(LIBGCC_PATH)/include -isystem $(LIBGCC_PATH)/include-fixed
|
2015-07-01 16:43:42 -03:00
|
|
|
LDFLAGS += -m32 -nostdlib -T $(LINKERSCRIPT)
|
|
|
|
ASFLAGS += --32 -march=i586 -mtune=i586
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
TARGET_LIBFILES = $(OBJECTDIR)/newlib-syscalls.o $(LIBC)/lib/libm.a $(LIBC)/lib/libc.a $(LIBGCC_PATH)/32/libgcc.a
|