Makefile.in 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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. # XXX: GNU_GETOPT comes with getopt_long unconditionally, which is wrong
  16. GO_LONG := $(if $(UCLIBC_HAS_GNU_GETOPT),getopt_long-simple.c)
  17. OMIT-y += $(if $(UCLIBC_HAS_GNU_GETOPT),getopt-susv3.c $(GO_LONG),getopt.c)
  18. OMIT-y += $(if $(UCLIBC_HAS_GNU_GETSUBOPT),getsubopt-susv3.c,getsubopt.c)
  19. CSRC-y := $(filter-out $(OMIT-y),$(CSRC-y))
  20. UNISTD_SRC := $(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC-y))
  21. UNISTD_OBJ := $(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC-y))
  22. libc-y += $(UNISTD_OBJ)
  23. objclean-y += CLEAN_libc/unistd
  24. CLEAN_libc/unistd:
  25. $(do_rm) $(addprefix $(UNISTD_OUT)/*., o os)