b2fa72bb98
Now the cpu/x86/ provides a Makefile.x86_common and a Makefile.x86_pc. The former includes the common Makefile and adds legacy pc specific implementations (currently, drivers only) into the building context, while the latter has everything that defines the bootstrap of a x86 CPU. This commit also fixes platform/galileo/ so it includes the correct makefile - Makefile.x86_quarkX1000. Galileo uses a Quark X1000 SoC which is not an IBM Generic PC-like CPU, but it does provide most of a PCs peripherals through its "Legacy Bridge". Thus, it makes sense that QuarkX1000's Makefile includes code from the legacy_pc x86 cpu.
21 lines
1013 B
Makefile
21 lines
1013 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 loader.S clock.c rtimer-arch.c
|
|
|
|
LINKERSCRIPT = $(CONTIKI)/platform/galileo/galileo.ld
|
|
|
|
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
|