Makefile.in 1.2 KB

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