Makefile.in 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. COMMON_SSP:=ssp.c ssp-local.c
  14. # full list
  15. #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
  16. 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
  17. ifneq ($(UCLIBC_HAS_SSP),y)
  18. CSRC:=$(filter-out $(COMMON_SSP),$(CSRC))
  19. endif
  20. ifneq ($(DOMULTI),n)
  21. CSRC:=$(filter-out $(COMMON_NO_MULTI),$(CSRC))
  22. CSRC:=$(filter-out $(COMMON_SSP),$(CSRC))
  23. endif
  24. # fails for some reason
  25. ifneq ($(strip $(ARCH_OBJS)),)
  26. CSRC:=$(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC))
  27. endif
  28. CFLAGS-ssp.c=$(SSP_DISABLE_FLAGS)
  29. CFLAGS-ssp-local.c=$(SSP_DISABLE_FLAGS)
  30. COMMON_SRC:=$(patsubst %.c,$(COMMON_DIR)/%.c,$(CSRC))
  31. COMMON_OBJ:=$(patsubst %.c,$(COMMON_OUT)/%.o,$(CSRC))
  32. libc-a-y+=$(COMMON_OBJ)
  33. libc-so-y+=$(COMMON_OBJ:.o=.os)
  34. libc-nonshared-$(UCLIBC_HAS_SSP)+=$(COMMON_OUT)/ssp-local.os
  35. libc-multi-y+=$(COMMON_SRC)
  36. libc-nomulti-y+=$(patsubst %.c,$(COMMON_OUT)/%.o,$(COMMON_NO_MULTI))
  37. libc-nomulti-$(UCLIBC_HAS_SSP)+=$(patsubst %.c,$(COMMON_OUT)/%.o,$(COMMON_SSP))
  38. objclean-y+=common_objclean
  39. common_objclean:
  40. $(RM) $(COMMON_OUT)/*.{o,os}