1# vi:ft=make
2PKGDIR		?= ..
3L4DIR		?= $(PKGDIR)/../..
4
5TARGET          := libuc_c_minimal.a libuc_c_minimal.p.a
6PC_FILENAME     := libc_minimal
7PC_LIBS         := -luc_c_minimal
8define PC_EXTRA
9Link_Libs=  %{static:-luc_c_minimal}
10endef
11
12DEFINES		+= -DL4_MINIMAL_LIBC
13LIBCSRC_DIR	?= $(PKGDIR)/../uclibc/lib/uclibc
14
15include $(LIBCSRC_DIR)/make_vars.mk
16include $(LIBCSRC_DIR)/make_rules.mk
17include $(LIBCSRC_DIR)/contrib_files.mk
18
19DIRS := libc/string libc/stdlib libc/stdio libc/unistd libc/signal \
20        libc/misc libc/stdlib/malloc-standard libc/sysdeps/linux
21
22CFLAGS_clang += -mno-implicit-float
23CXXFLAGS_clang += -mno-implicit-float
24
25CFLAGS += $(CFLAGS_$(BID_COMPILER_TYPE))
26CXXFLAGS += $(CXXFLAGS_$(BID_COMPILER_TYPE))
27
28SUB_MODULES :=
29
30# process all sources for the libc
31$(eval $(call PROCESS_src_lists, $(DIRS), $(SUB_MODULES)))
32# libm stuff
33
34define GEN_SRC_VARS
35SRC_C_$(1)  += $(UCLIBC_SRC_C)  $(UCLIBC_SRC_C_libuc_c_minimal.a) \
36                    libc/stdlib/atexit.c
37SRC_CC_$(1) += $(UCLIBC_SRC_CC) $(UCLIBC_SRC_CC_libuc_c_minimal.a)
38SRC_S_$(1)  += $(UCLIBC_SRC_S)  $(UCLIBC_SRC_S_libuc_c_minimal.a)
39endef
40
41$(foreach target,$(TARGET), $(eval $(call GEN_SRC_VARS,$(target))))
42
43$(GENERAL_D_LOC): $(SRC_DIR)/Make.rules $(LIBCSRC_DIR)/contrib_files.mk
44