blob: 5eedf17326a6177884e96a6ce70cdd4e9be2fcde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# Makefile for uClibc
#
# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
subdirs += libc/unistd
UNISTD_DIR := $(top_srcdir)libc/unistd
UNISTD_OUT := $(top_builddir)libc/unistd
CSRC-y := $(notdir $(wildcard $(UNISTD_DIR)/*.c))
OMIT-y := exec.c # multi source
OMIT-$(ARCH_USE_MMU) += __exec_alloc.c
OMIT-$(if $(UCLIBC_SUSV3_LEGACY),,y) += ualarm.c usleep.c
#OMIT-$(UCLIBC_HAS_THREADS_NATIVE) += sleep.c
# the VARIANT we OMIT
# GNU_GETOPT comes with getopt_long unconditionally (?), OMIT the other
VARIANT := $(if $(UCLIBC_HAS_GNU_GETOPT),-susv3)
GO_LONG := $(if $(UCLIBC_HAS_GNU_GETOPT),getopt_long-simple.c)
OMIT-$(UCLIBC_HAS_GNU_GETOPT) += getopt$(VARIANT).c $(GO_LONG)
OMIT-$(UCLIBC_HAS_GNU_GETSUBOPT) += getsubopt$(VARIANT).c
CSRC-y := $(filter-out $(OMIT-y),$(CSRC-y))
UNISTD_SRC := $(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC-y))
UNISTD_OBJ := $(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC-y))
libc-y += $(UNISTD_OBJ)
objclean-y += CLEAN_libc/unistd
CLEAN_libc/unistd:
$(do_rm) $(addprefix $(UNISTD_OUT)/*., o os)
|