3 # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 subdirs
+= libc
/misc
/internals
10 CSRC-y
:= tempname.c errno.c h_errno.c __errno_location.c __h_errno_location.c \
11 parse_config.c version.c
13 MISC_INTERNALS_DIR
:= $(top_srcdir
)libc
/misc
/internals
14 MISC_INTERNALS_OUT
:= $(top_builddir
)libc
/misc
/internals
16 MISC_INTERNALS_SRC
:= $(patsubst %.c
,$(MISC_INTERNALS_DIR
)/%.c
,$(CSRC-y
))
17 MISC_INTERNALS_OBJ
:= $(patsubst %.c
,$(MISC_INTERNALS_OUT
)/%.o
,$(CSRC-y
))
19 CFLAGS-__uClibc_main.c
:= $(SSP_DISABLE_FLAGS
)
20 CFLAGS-reloc_static_pie.c
:= $(SSP_DISABLE_FLAGS
) -DL_rcrt1
22 libc-y
+= $(MISC_INTERNALS_OBJ
)
23 ifneq ($(UCLIBC_FORMAT_SHARED_FLAT
),y
)
24 libc-shared-y
+= $(MISC_INTERNALS_OUT
)/__uClibc_main.oS
26 libc-shared-y
+= $(MISC_INTERNALS_OUT
)/__uClibc_main.os
28 # link order is important to not pull in pthread functions, when
29 # a single threaded application is statically linked
30 libc-static-y
:= $(MISC_INTERNALS_OUT
)/__uClibc_main.o
$(libc-static-y
)
31 libc-static-
$(UCLIBC_FORMAT_FLAT_SEP_DATA
) += \
32 $(MISC_INTERNALS_OUT
)/shared_flat_initfini.o \
33 $(MISC_INTERNALS_OUT
)/shared_flat_add_library.o
34 libc-static-
$(UCLIBC_FORMAT_SHARED_FLAT
) += \
35 $(MISC_INTERNALS_OUT
)/shared_flat_initfini.o \
36 $(MISC_INTERNALS_OUT
)/shared_flat_add_library.o
37 libc-static-
$(STATIC_PIE
) += $(MISC_INTERNALS_OUT
)/reloc_static_pie.o
38 libc-shared-
$(UCLIBC_FORMAT_SHARED_FLAT
) += \
39 $(MISC_INTERNALS_OUT
)/shared_flat_initfini.os \
40 $(MISC_INTERNALS_OUT
)/shared_flat_add_library.os
41 libc-nomulti-y
+= $(MISC_INTERNALS_OUT
)/__uClibc_main.o
43 objclean-y
+= CLEAN_libc
/misc
/internals
45 CLEAN_libc
/misc
/internals
:
46 $(do_rm
) $(addprefix $(MISC_INTERNALS_OUT
)/*.
, o os oS
)