Makefile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Makefile for uClibc's pthread library
  2. #
  3. # Copyright (C) 2002 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # This program is free software; you can redistribute it and/or modify it under
  6. # the terms of the GNU Library General Public License as published by the Free
  7. # Software Foundation; either version 2 of the License, or (at your option) any
  8. # later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but WITHOUT
  11. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Library General Public License
  16. # along with this program; if not, write to the Free Software Foundation, Inc.,
  17. # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. # Makefile for uClibc
  19. TOPDIR=../../
  20. include $(TOPDIR)Rules.mak
  21. #Adjust the soname version to avoid namespace collisions with glibc's libpthread
  22. LIBTHREAD_DB:=../libthread_db.a
  23. ifeq ($(strip $(TARGET_ARCH)),sparc)
  24. SYSDEPS_DIR:=$(TARGET_ARCH)/sparc32
  25. else
  26. SYSDEPS_DIR:=$(TARGET_ARCH)
  27. endif
  28. # set up system dependencies include dirs (NOTE: order matters!)
  29. PTDIR = $(TOPDIR)libpthread/linuxthreads/
  30. SYSDEPINC = -I$(PTDIR)sysdeps/unix/sysv/linux \
  31. -I$(PTDIR)sysdeps/pthread \
  32. -I$(PTDIR)sysdeps/unix/sysv \
  33. -I$(PTDIR)sysdeps/unix/unix \
  34. -I$(PTDIR)sysdeps/$(TARGET_ARCH) \
  35. -I$(PTDIR)sysdeps \
  36. -I$(TOPDIR)libc/sysdeps/linux/$(TARGET_ARCH)
  37. CFLAGS += $(SYSDEPINC) -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
  38. CSRC=td_init.c td_log.c td_ta_clear_event.c td_ta_delete.c \
  39. td_ta_enable_stats.c td_ta_event_addr.c td_ta_event_getmsg.c \
  40. td_ta_get_nthreads.c td_ta_get_ph.c td_ta_get_stats.c \
  41. td_ta_map_id2thr.c td_ta_map_lwp2thr.c td_ta_new.c td_ta_reset_stats.c \
  42. td_ta_set_event.c td_ta_setconcurrency.c td_ta_thr_iter.c \
  43. td_ta_tsd_iter.c td_thr_clear_event.c td_thr_dbresume.c \
  44. td_thr_dbsuspend.c td_thr_event_enable.c td_thr_event_getmsg.c \
  45. td_thr_get_info.c td_thr_getfpregs.c td_thr_getgregs.c \
  46. td_thr_getxregs.c td_thr_getxregsize.c td_thr_set_event.c \
  47. td_thr_setfpregs.c td_thr_setgregs.c td_thr_setprio.c \
  48. td_thr_setsigpending.c td_thr_setxregs.c td_thr_sigsetmask.c \
  49. td_thr_tsd.c td_thr_validate.c td_symbol_list.c
  50. COBJS=$(patsubst %.c,%.o, $(CSRC))
  51. OBJS=$(COBJS)
  52. all: $(OBJS) $(LIBTHREAD_DB)
  53. $(LIBTHREAD_DB): ar-target
  54. ar-target: $(OBJS)
  55. $(AR) $(ARFLAGS) $(LIBTHREAD_DB) $(OBJS)
  56. $(COBJS): %.o : %.c
  57. $(CC) $(CFLAGS) -c $< -o $@
  58. $(STRIPTOOL) -x -R .note -R .comment $*.o
  59. clean:
  60. rm -f *.[oa] *~ core