galileo: Fix newlib-syscalls issue in Makefile

This patch removes 'newlib-syscalls.c' from CONTIKI_SOURCEFILES variable
and appends it to PROJECT_SOURCEFILES. This way the buildsystem will
automatically consider the newlib-syscalls object code during linking
time.
This commit is contained in:
Andre Guedes 2015-07-13 18:54:24 -03:00 committed by Jesus Sanchez-Palencia
parent 8a0bc49433
commit 7043aa41b3

View File

@ -5,7 +5,9 @@ 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_SOURCEFILES += contiki-main.c clock.c rtimer-arch.c
PROJECT_SOURCEFILES += newlib-syscalls.c
CONTIKI_CPU=$(CONTIKI)/cpu/x86
include $(CONTIKI)/cpu/x86/Makefile.x86_quarkX1000
@ -22,4 +24,4 @@ endif
# 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
TARGET_LIBFILES = $(LIBC)/lib/libm.a $(LIBC)/lib/libc.a $(LIBGCC_PATH)/32/libgcc.a