Makefile.in 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. CSRC:= sleep.c usleep.c ualarm.c getpass.c sysconf.c getlogin.c \
  8. fpathconf.c confstr.c pathconf.c swab.c usershell.c \
  9. getsubopt.c
  10. ifeq ($(ARCH_HAS_MMU),y)
  11. CSRC+= daemon.c
  12. endif
  13. MSRC:=exec.c
  14. MOBJ:=execl.o execv.o execle.o execlp.o execvp.o
  15. ifneq ($(ARCH_HAS_MMU),y)
  16. MOBJ+=__exec_alloc.o
  17. endif
  18. ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
  19. CSRC+=getopt.c
  20. else
  21. CSRC+=getopt-susv3.c
  22. endif
  23. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  24. CSRC:=$(filter-out sleep.c,$(CSRC))
  25. endif
  26. UNISTD_DIR:=$(top_srcdir)libc/unistd
  27. UNISTD_OUT:=$(top_builddir)libc/unistd
  28. UNISTD_SRC:=$(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC))
  29. UNISTD_OBJ:=$(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC))
  30. UNISTD_MSRC:=$(patsubst %.c,$(UNISTD_DIR)/%.c,$(MSRC))
  31. UNISTD_MOBJ:=$(patsubst %.o,$(UNISTD_OUT)/%.o,$(MOBJ))
  32. UNISTD_DEF:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(UNISTD_MOBJ))))
  33. UNISTD_OBJS:=$(UNISTD_OBJ) $(UNISTD_MOBJ)
  34. $(UNISTD_MOBJ): $(UNISTD_MSRC)
  35. $(compile.m)
  36. $(UNISTD_MOBJ:.o=.os): $(UNISTD_MSRC)
  37. $(compile.m)
  38. libc-a-y+=$(UNISTD_OBJS)
  39. libc-so-y+=$(UNISTD_OBJS:.o=.os)
  40. CFLAGS-multi-y+=$(UNISTD_DEF)
  41. libc-multi-y+=$(UNISTD_SRC) $(UNISTD_MSRC)
  42. objclean-y+=unistd_objclean
  43. unistd_objclean:
  44. $(RM) $(UNISTD_OUT)/*.{o,os}