build: build libc as object, not kbuild library (lib.a)

The way we build the libc files is not a real library that can be
used as a libc and makes managing the source files a bit
difficult, so lets revert back to building the c function files
like everything else in the system to avoid any confusion.

Change-Id: I4e998e37bc376522fe253c4aefefe7804597f0f2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2015-08-02 09:38:41 -04:00
commit 8d00ec5c4e
8 changed files with 12 additions and 14 deletions

View file

@ -519,7 +519,7 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf
$(Q)$(MAKE) $(build)=$(@)
core-y := arch/ kernel/ misc/ net/
core-y := lib/ arch/ kernel/ misc/ net/
platform-y := drivers/
ifneq ($(strip $(PROJECT)),)
@ -551,14 +551,10 @@ include/config/auto.conf: ;
endif # $(dot-config)
ifdef CONFIG_MINIMAL_LIBC
# Objects we will link into the kernel / subdirs we need to visit
KLIBC_DIR := lib/libc/minimal
libs-y := $(KLIBC_DIR)/
ZEPHYRINCLUDE += -I$(srctree)/lib/libc/minimal/include
endif
ifdef CONFIG_TOOLCHAIN_NEWLIB
libs-y += lib/libc/newlib/
ALL_LIBS += c m
endif

1
lib/Makefile Normal file
View file

@ -0,0 +1 @@
obj-y := libc/

View file

@ -1,2 +1,2 @@
libs-$(CONFIG_MINIMAL_LIBC) += minimal/
libs-$(CONFIG_NEWLIB) += newlib/
obj-$(CONFIG_MINIMAL_LIBC) += minimal/
obj-$(CONFIG_NEWLIB) += newlib/

View file

@ -1,5 +1 @@
lib-y := source/stdout/fprintf.o
lib-y += source/stdout/prf.o
lib-y += source/stdout/sprintf.o
lib-y += source/stdout/stdout_console.o
lib-y += source/string/string.o
obj-y := source/

View file

@ -0,0 +1,2 @@
obj-y := stdout/
obj-y += string/

View file

@ -0,0 +1,2 @@
obj-y = fprintf.o prf.o sprintf.o stdout_console.o

View file

@ -0,0 +1 @@
obj-y := string.o

View file

@ -1 +1 @@
lib-y := libc-hooks.o
obj-y := libc-hooks.o