Makefile.in 1.1 KB

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