Makefile.in 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
  16. # GNU getopt family
  17. OMIT-y += getopt-susv3.c getopt_long-simple.c getsubopt-susv3.c
  18. OMIT-y += $(if $(UCLIBC_HAS_GNU_GETSUBOPT),,getsubopt.c)
  19. else
  20. # SuS getopt family
  21. OMIT-y += getopt.c getsubopt.c
  22. OMIT-y += $(if $(UCLIBC_HAS_GETOPT_LONG),,getopt_long-simple.c)
  23. OMIT-y += $(if $(UCLIBC_HAS_GNU_GETSUBOPT),,getsubopt-susv3.c)
  24. endif
  25. CSRC-y := $(filter-out $(OMIT-y),$(CSRC-y))
  26. UNISTD_SRC := $(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC-y))
  27. UNISTD_OBJ := $(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC-y))
  28. libc-y += $(UNISTD_OBJ)
  29. objclean-y += CLEAN_libc/unistd
  30. CLEAN_libc/unistd:
  31. $(do_rm) $(addprefix $(UNISTD_OUT)/*., o os)