Makefile.in 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 := $(notdir $(wildcard $(UNISTD_DIR)/*.c))
  11. # multi source
  12. CSRC := $(filter-out exec.c,$(CSRC))
  13. ifeq ($(ARCH_USE_MMU),y)
  14. CSRC := $(filter-out __exec_alloc.c,$(CSRC))
  15. endif
  16. ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
  17. CSRC := $(filter-out getopt-susv3.c getopt_long-simple.c,$(CSRC))
  18. else
  19. CSRC := $(filter-out getopt.c,$(CSRC))
  20. ifneq ($(UCLIBC_HAS_GETOPT_LONG),y)
  21. CSRC := $(filter-out getopt_long-simple.c,$(CSRC))
  22. endif
  23. endif
  24. ifeq ($(UCLIBC_HAS_GNU_GETSUBOPT),y)
  25. CSRC := $(filter-out getsubopt-susv3.c,$(CSRC))
  26. else
  27. CSRC := $(filter-out getsubopt.c,$(CSRC))
  28. endif
  29. ifneq ($(UCLIBC_SUSV3_LEGACY),y)
  30. CSRC := $(filter-out ualarm.c usleep.c,$(CSRC))
  31. endif
  32. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  33. CSRC := $(filter-out sleep.c,$(CSRC))
  34. endif
  35. UNISTD_SRC := $(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC))
  36. UNISTD_OBJ := $(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC))
  37. libc-y += $(UNISTD_OBJ)
  38. objclean-y += unistd_clean
  39. unistd_clean:
  40. $(do_rm) $(addprefix $(UNISTD_OUT)/*., o os)