1 |
1325 |
phoenix |
# Makefile for uClibc's pthread library
|
2 |
|
|
#
|
3 |
|
|
# Copyright (C) 2002 Erik Andersen
|
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 |
|
|
|
20 |
|
|
TOPDIR=../../
|
21 |
|
|
include $(TOPDIR)Rules.mak
|
22 |
|
|
|
23 |
|
|
#Adjust the soname version to avoid namespace collisions with glibc's libpthread
|
24 |
|
|
LIBTHREAD_DB:=../libthread_db.a
|
25 |
|
|
ifeq ($(strip $(TARGET_ARCH)),sparc)
|
26 |
|
|
SYSDEPS_DIR:=$(TARGET_ARCH)/sparc32
|
27 |
|
|
else
|
28 |
|
|
SYSDEPS_DIR:=$(TARGET_ARCH)
|
29 |
|
|
endif
|
30 |
|
|
|
31 |
|
|
# set up system dependencies include dirs (NOTE: order matters!)
|
32 |
|
|
PTDIR = $(TOPDIR)libpthread/linuxthreads/
|
33 |
|
|
SYSDEPINC = -I$(PTDIR)sysdeps/unix/sysv/linux \
|
34 |
|
|
-I$(PTDIR)sysdeps/pthread \
|
35 |
|
|
-I$(PTDIR)sysdeps/unix/sysv \
|
36 |
|
|
-I$(PTDIR)sysdeps/unix/unix \
|
37 |
|
|
-I$(PTDIR)sysdeps/$(TARGET_ARCH) \
|
38 |
|
|
-I$(PTDIR)sysdeps \
|
39 |
|
|
-I$(TOPDIR)libc/sysdeps/linux/$(TARGET_ARCH)
|
40 |
|
|
CFLAGS += $(SYSDEPINC) -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
|
41 |
|
|
|
42 |
|
|
CSRC= td_init.c td_log.c td_ta_delete.c td_ta_get_nthreads.c \
|
43 |
|
|
td_ta_get_ph.c td_ta_map_id2thr.c td_ta_map_lwp2thr.c \
|
44 |
|
|
td_ta_new.c td_ta_thr_iter.c td_ta_tsd_iter.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_setfpregs.c \
|
47 |
|
|
td_thr_setgregs.c td_thr_setprio.c td_thr_setsigpending.c \
|
48 |
|
|
td_thr_setxregs.c td_thr_sigsetmask.c td_thr_tsd.c \
|
49 |
|
|
td_thr_validate.c td_thr_dbsuspend.c td_thr_dbresume.c \
|
50 |
|
|
td_ta_setconcurrency.c td_ta_enable_stats.c \
|
51 |
|
|
td_ta_reset_stats.c td_ta_get_stats.c td_ta_event_addr.c \
|
52 |
|
|
td_thr_event_enable.c td_thr_set_event.c \
|
53 |
|
|
td_thr_clear_event.c td_thr_event_getmsg.c \
|
54 |
|
|
td_ta_set_event.c td_ta_event_getmsg.c \
|
55 |
|
|
td_ta_clear_event.c td_symbol_list.c td_thr_tls_get_addr.c
|
56 |
|
|
|
57 |
|
|
COBJS=$(patsubst %.c,%.o, $(CSRC))
|
58 |
|
|
OBJS=$(COBJS)
|
59 |
|
|
|
60 |
|
|
all: $(OBJS) $(LIBTHREAD_DB)
|
61 |
|
|
|
62 |
|
|
$(LIBTHREAD_DB): ar-target
|
63 |
|
|
|
64 |
|
|
ar-target: $(OBJS)
|
65 |
|
|
$(AR) $(ARFLAGS) $(LIBTHREAD_DB) $(OBJS)
|
66 |
|
|
|
67 |
|
|
$(COBJS): %.o : %.c
|
68 |
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
69 |
|
|
$(STRIPTOOL) -x -R .note -R .comment $*.o
|
70 |
|
|
|
71 |
|
|
clean:
|
72 |
|
|
$(RM) *.[oa] *~ core
|
73 |
|
|
|
74 |
|
|
|