osd-contiki/platform/galileo/Makefile.galileo
Andre Guedes a8849b2909 x86: Move bootstrap code and linker script to cpu/x86
This is a refactoring patch, no functionality is changed. It moves
loader.S and galileo.ld from platform/galileo/ to cpu/x86/ directory
since they seem to be more SoC-specific than platform-specific.

It also renames galileo.ld to quarkX1000.ld since it can be used by
any platform based on Quark X1000 SoC, not only Galileo.

Furthermore, this patch also renames loader.S to bootstrap_quarkX1000.S
since it is pretty much a bootstrap code to any platform based on Quark
X1000 SoC.
2015-12-21 08:06:14 -02:00

19 lines
949 B
Makefile

LIBC=$(CONTIKI)/platform/galileo/bsp/libc/i586-elf
LIBGCC_PATH = /usr/lib/gcc/$(shell gcc -dumpmachine)/$(shell gcc -dumpversion)
CONTIKI_TARGET_DIRS = . core/sys/
CONTIKI_TARGET_MAIN = ${addprefix $(OBJECTDIR)/,contiki-main.o}
CONTIKI_SOURCEFILES += contiki-main.c newlib-syscalls.c clock.c rtimer-arch.c
CONTIKI_CPU=$(CONTIKI)/cpu/x86
include $(CONTIKI)/cpu/x86/Makefile.x86_quarkX1000
CFLAGS += -m32 -march=i586 -nostdinc -isystem $(LIBC)/include -isystem $(LIBGCC_PATH)/include -isystem $(LIBGCC_PATH)/include-fixed
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