Makefile.in 1.8 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. COMMON_DIR:=$(top_srcdir)libc/sysdeps/linux/common
  8. COMMON_OUT:=$(top_builddir)libc/sysdeps/linux/common
  9. CSRC:=$(patsubst $(COMMON_DIR)/%.c,%.c,$(wildcard $(COMMON_DIR)/*.c))
  10. ifeq ($(EXCLUDE_BRK),y)
  11. CSRC:=$(filter-out sbrk.c,$(CSRC))
  12. endif
  13. ifneq ($(UCLIBC_HAS_LFS),y)
  14. CSRC_LFS:=$(patsubst $(COMMON_DIR)/%.c,%.c,$(wildcard $(COMMON_DIR)/*64.c))
  15. CSRC:=$(filter-out llseek.c $(CSRC_LFS),$(CSRC))
  16. endif
  17. # full list
  18. #COMMON_NO_MULTI:=getcwd.c getrlimit.c getrlimit64.c setrlimit.c setrlimit64.c getpriority.c getpriority64.c setpriority.c getrusage.c wait4.c getitimer.c setitimer.c open.c open64.c uname.c __syscall_fcntl.c __syscall_fcntl64.c
  19. COMMON_NO_MULTI:=getrlimit.c getrlimit64.c setrlimit.c setrlimit64.c getpriority.c setpriority.c getrusage.c getitimer.c setitimer.c uname.c __syscall_rt_sigaction.c
  20. CSRC:=$(filter-out ssp-local.c,$(CSRC))
  21. ifneq ($(UCLIBC_HAS_SSP),y)
  22. CSRC:=$(filter-out ssp.c,$(CSRC))
  23. endif
  24. ifneq ($(DOMULTI),n)
  25. CSRC:=$(filter-out $(COMMON_NO_MULTI),$(CSRC))
  26. endif
  27. # fails for some reason
  28. ifneq ($(strip $(ARCH_OBJS)),)
  29. CSRC:=$(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC))
  30. endif
  31. CFLAGS-ssp.c=$(SSP_DISABLE_FLAGS)
  32. CFLAGS-ssp-local.c=$(SSP_DISABLE_FLAGS)
  33. COMMON_SRC:=$(patsubst %.c,$(COMMON_DIR)/%.c,$(CSRC))
  34. COMMON_OBJ:=$(patsubst %.c,$(COMMON_OUT)/%.o,$(CSRC))
  35. libc-a-y+=$(COMMON_OBJ)
  36. libc-so-y+=$(COMMON_OBJ:.o=.os)
  37. libc-static-$(UCLIBC_HAS_SSP)+=$(COMMON_OUT)/ssp-local.o
  38. libc-nonshared-$(UCLIBC_HAS_SSP)+=$(COMMON_OUT)/ssp-local.os
  39. libc-multi-y+=$(COMMON_SRC)
  40. libc-nomulti-y+=$(patsubst %.c,$(COMMON_OUT)/%.o,$(COMMON_NO_MULTI))
  41. objclean-y+=common_objclean
  42. common_objclean:
  43. $(RM) $(COMMON_OUT)/*.{o,os}