1 # Makefile for uClibc NPTL
3 # Copyright (C) 2009 Bernhard Reutner-Fischer <uclibc@uclibc.org>
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 libpthread_LINUX_ARCH_SSRC = pt-vfork.S
9 libpthread_LINUX_ARCH_CSRC = pthread_once.c pt-__syscall_error.c
12 libc_a_SSRC = clone.S vfork.S
14 ARCH_OBJS += $(libc_a_SSRC:.S=.c)
16 CFLAGS += $(SSP_ALL_CFLAGS)
17 ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
18 CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
21 CFLAGS-pthread_once.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
22 CFLAGS-lowlevellock.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
23 CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
25 ASFLAGS-pt-vfork.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -D_LIBC_REENTRANT -DUSE___THREAD
26 #ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT -DUSE___THREAD
27 #ASFLAGS-lowlevellock.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -D_LIBC_REENTRANT -DUSE___THREAD
28 ASFLAGS-clone.S = -D_LIBC_REENTRANT
29 ASFLAGS-vfork.S = -D_LIBC_REENTRANT
31 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
32 #Needed to use the correct SYSCALL_ERROR_HANDLER
33 ASFLAGS-clone.S += -DUSE___THREAD
34 ASFLAGS-vfork.S += -DUSE___THREAD
37 LINUX_ARCH_DIR:=$(top_srcdir)libpthread/nptl/sysdeps/unix/sysv/linux/powerpc
38 LINUX_ARCH_OUT:=$(top_builddir)libpthread/nptl/sysdeps/unix/sysv/linux/powerpc
39 LINUX_ARCH_OBJ:=$(patsubst %.S,$(LINUX_ARCH_OUT)/%.o,$(libpthread_LINUX_ARCH_SSRC))
40 LINUX_ARCH_OBJ+=$(patsubst %.c,$(LINUX_ARCH_OUT)/%.o,$(libpthread_LINUX_ARCH_CSRC))
43 libpthread-a-y += $(LINUX_ARCH_OBJ:.o=.os)
45 libpthread-a-y += $(LINUX_ARCH_OBJ)
47 libpthread-so-y += $(LINUX_ARCH_OBJ:.o=.oS)
49 libpthread-multi-y+=$(libpthread_LINUX_ARCH_CSRC)
51 LIBC_LINUX_ARCH_OBJ:=$(patsubst %.c,$(LINUX_ARCH_OUT)/%.o,$(libc_a_CSRC))
52 LIBC_LINUX_ARCH_OBJ+=$(patsubst %.S,$(LINUX_ARCH_OUT)/%.o,$(libc_a_SSRC))
54 libc-static-y+=$(LIBC_LINUX_ARCH_OBJ)
55 libc-shared-y+=$(LIBC_LINUX_ARCH_OBJ:.o=.oS)
57 libc-multi-y+=$(libc_a_CSRC)
59 objclean-y+=nptl_linux_arch_clean
61 nptl_linux_arch_clean:
62 $(do_rm) $(addprefix $(LINUX_ARCH_OUT)/*., o os oS)