]> Git Repo - uclibc-ng.git/blob - libpthread/linuxthreads/Makefile
eba08a25d2552c9e870989c73e963481fba72088
[uclibc-ng.git] / libpthread / linuxthreads / Makefile
1 # Makefile for uClibc's pthread library
2 #
3 # Copyright (C) 2002 Erik Andersen <[email protected]>
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 PT_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
25 LIBPTHREAD=../libpthread.a
26
27 # set up system dependencies include dirs (NOTE: order matters!)
28 PTDIR = $(TOPDIR)libpthread/linuxthreads/
29 SYSDEPINC = -I$(PTDIR)sysdeps/unix/sysv/linux \
30             -I$(PTDIR)sysdeps/pthread \
31             -I$(PTDIR)sysdeps/unix/sysv \
32             -I$(PTDIR)sysdeps/unix/unix \
33             -I$(PTDIR)sysdeps/$(TARGET_ARCH) \
34             -I$(PTDIR)sysdeps \
35             -I$(TOPDIR)libc/sysdeps/linux/$(TARGET_ARCH)
36 CFLAGS += $(SYSDEPINC) -DLIBPTHREAD_SO="\"libpthread.so.$(PT_VERSION)\"" -D_GNU_SOURCE
37
38 CSRC=attr.c cancel.c condvar.c errno.c events.c join.c lockfile.c manager.c \
39         mutex.c oldsemaphore.c pt-machine.c ptfork.c pthread.c \
40         ptlongjmp.c rwlock.c semaphore.c signals.c specific.c spinlock.c \
41         wrapsyscall.c #weaks.c no-tsd.c
42 COBJS=$(patsubst %.c,%.o, $(CSRC))
43 OBJS=$(COBJS)
44
45 all: $(OBJS) $(LIBPTHREAD)
46
47 $(LIBPTHREAD): ar-target
48
49 ar-target: $(OBJS)
50         $(AR) $(ARFLAGS) $(LIBPTHREAD) $(OBJS)
51
52 $(COBJS): %.o : %.c
53         $(CC) $(CFLAGS) -c $< -o $@
54         $(STRIPTOOL) -x -R .note -R .comment $*.o
55
56 clean:
57         rm -f *.[oa] *~ core
58
59
This page took 0.029937 seconds and 2 git commands to generate.