Makefile.in 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org>
  4. # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  5. #
  6. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. #
  8. CFLAGS+=$(SSP_ALL_CFLAGS)
  9. # This stuff will not compile without at least -O1
  10. CFLAGS:=$(CFLAGS:-O0=-O1)
  11. LDFLAGS:=$(LDFLAGS_NOSTRIP)
  12. ifeq ($(UCLIBC_CTOR_DTOR),y)
  13. SHARED_START_FILES:=$(top_builddir)lib/crti.o $(LIBGCC_DIR)crtbeginS.o
  14. SHARED_END_FILES:=$(LIBGCC_DIR)crtendS.o $(top_builddir)lib/crtn.o
  15. endif
  16. ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
  17. STRIP_FLAGS:=-X --strip-debug -R .note -R .comment
  18. endif
  19. DOMULTI=n
  20. LIB_NAME:=libpthread
  21. libpthread_DIR:=$(top_srcdir)libpthread/linuxthreads
  22. libpthread_OUT:=$(top_builddir)libpthread/linuxthreads
  23. ARCH_CFLAGS:=$(CFLAGS)
  24. -include $(libpthread_DIR)/sysdeps/$(TARGET_ARCH)/Makefile.arch
  25. CFLAGS:=$(ARCH_CFLAGS)
  26. libpthread_SRC:=$(wildcard $(libpthread_DIR)/*.c)
  27. ifneq ($(UCLIBC_HAS_XLOCALE),y)
  28. libpthread_SRC:=$(filter-out $(libpthread_DIR)/locale.c,$(libpthread_SRC))
  29. endif
  30. ifneq ($(DOMULTI),n)
  31. libpthread_NO_MULTI:=manager.c pt-machine.c
  32. libpthread_SRC:=$(filter-out $(patsubst %.c,$(libpthread_DIR)/%.c,$(libpthread_NO_MULTI)),$(libpthread_SRC))
  33. endif
  34. # remove generic sources, if arch specific version is present
  35. ifneq ($(strip $(libpthread_ARCH_SRC)),)
  36. libpthread_SRC:=$(filter-out $(patsubst %.c,$(libpthread_DIR)/%.c,$(notdir $(libpthread_ARCH_SRC))),$(libpthread_SRC))
  37. endif
  38. libpthread_OBJ:=$(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SRC))
  39. libpthread-a-$(UCLIBC_HAS_THREADS)+=$(libpthread_OBJ)
  40. libpthread-so-$(UCLIBC_HAS_THREADS)+=$(libpthread_OBJ:.o=.os)
  41. libpthread-multi-$(UCLIBC_HAS_THREADS)+=$(libpthread_SRC)
  42. libpthread-nomulti-$(UCLIBC_HAS_THREADS)+=$(patsubst %.c,$(libpthread_OUT)/%.o,$(libpthread_NO_MULTI))
  43. objclean-y+=libpthread_clean
  44. lib-a-$(UCLIBC_HAS_THREADS)+=$(top_builddir)lib/libpthread.a
  45. lib-so-$(UCLIBC_HAS_THREADS)+=$(top_builddir)lib/libpthread.so