malloc: add glibc compat symbols
[uclibc-ng.git] / libc / unistd / Makefile.in
blob659008d4d074cab3e97986ea33659fb9d0f6f8ba
1 # Makefile for uClibc
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/unistd
10 UNISTD_DIR := $(top_srcdir)libc/unistd
11 UNISTD_OUT := $(top_builddir)libc/unistd
13 CSRC-y := $(notdir $(wildcard $(UNISTD_DIR)/*.c))
14 OMIT-y := exec.c # multi source
15 OMIT-$(ARCH_USE_MMU) += __exec_alloc.c
16 OMIT-$(if $(UCLIBC_SUSV3_LEGACY),,y) += ualarm.c usleep.c
17 #OMIT-$(UCLIBC_HAS_THREADS_NATIVE) += sleep.c
19 ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
20 # GNU getopt family
21 OMIT-y += getopt-susv3.c getopt_long-simple.c getsubopt-susv3.c
22 OMIT-y += $(if $(UCLIBC_HAS_GNU_GETSUBOPT),,getsubopt.c)
23 else
24 # SuS getopt family
25 OMIT-y += getopt.c getsubopt.c
26 OMIT-y += $(if $(UCLIBC_HAS_GETOPT_LONG),,getopt_long-simple.c)
27 OMIT-y += $(if $(UCLIBC_HAS_GNU_GETSUBOPT),,getsubopt-susv3.c)
28 endif
30 CSRC-y := $(filter-out $(OMIT-y),$(CSRC-y))
32 UNISTD_SRC := $(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC-y))
33 UNISTD_OBJ := $(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC-y))
35 libc-y += $(UNISTD_OBJ)
37 objclean-y += CLEAN_libc/unistd
39 CLEAN_libc/unistd:
40 $(do_rm) $(addprefix $(UNISTD_OUT)/*., o os)