Makefile.in 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 daemon.c
  10. MSRC:=exec.c
  11. MOBJ:=execl.o execv.o execle.o execlp.o execvp.o
  12. ifneq ($(ARCH_HAS_MMU),y)
  13. MOBJ+=__exec_alloc.o
  14. endif
  15. ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
  16. CSRC+=getopt.c
  17. else
  18. CSRC+=getopt-susv3.c
  19. endif
  20. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  21. CSRC:=$(filter-out sleep.c,$(CSRC))
  22. endif
  23. UNISTD_DIR:=$(top_srcdir)libc/unistd
  24. UNISTD_OUT:=$(top_builddir)libc/unistd
  25. UNISTD_SRC:=$(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC))
  26. UNISTD_OBJ:=$(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC))
  27. UNISTD_MSRC:=$(patsubst %.c,$(UNISTD_DIR)/%.c,$(MSRC))
  28. UNISTD_MOBJ:=$(patsubst %.o,$(UNISTD_OUT)/%.o,$(MOBJ))
  29. UNISTD_DEF:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(UNISTD_MOBJ))))
  30. UNISTD_OBJS:=$(UNISTD_OBJ) $(UNISTD_MOBJ)
  31. $(UNISTD_MOBJ): $(UNISTD_MSRC)
  32. $(compile.m)
  33. $(UNISTD_MOBJ:.o=.os): $(UNISTD_MSRC)
  34. $(compile.m)
  35. libc-a-y+=$(UNISTD_OBJS)
  36. libc-so-y+=$(UNISTD_OBJS:.o=.os)
  37. CFLAGS-multi-y+=$(UNISTD_DEF)
  38. libc-multi-y+=$(UNISTD_SRC) $(UNISTD_MSRC)
  39. objclean-y+=unistd_objclean
  40. unistd_objclean:
  41. $(RM) $(UNISTD_OUT)/*.{o,os}