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.
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
)
21 OMIT-y
+= getopt-susv3.c getopt_long-simple.c getsubopt-susv3.c
22 OMIT-y
+= $(if
$(UCLIBC_HAS_GNU_GETSUBOPT
),,getsubopt.c
)
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
)
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
40 $(do_rm
) $(addprefix $(UNISTD_OUT
)/*.
, o os
)