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 PTHREAD_ARCH_DIR := $(top_srcdir)libpthread/nptl/sysdeps/powerpc
9 PTHREAD_ARCH_OUT := $(top_builddir)libpthread/nptl/sysdeps/powerpc
12 libpthread_CSRC = pthread_spin_lock.c pthread_spin_trylock.c
14 PTHREAD_ARCH_OBJ := $(patsubst %.S,$(PTHREAD_ARCH_OUT)/%.o,$(libpthread_SSRC))
15 PTHREAD_ARCH_OBJ += $(patsubst %.c,$(PTHREAD_ARCH_OUT)/%.o,$(libpthread_CSRC))
18 libpthread-a-y += $(PTHREAD_ARCH_OBJ:.o=.os)
20 libpthread-a-y += $(PTHREAD_ARCH_OBJ)
22 libpthread-so-y += $(PTHREAD_ARCH_OBJ:.o=.oS)
24 libpthread-nomulti-y += $(PTHREAD_ARCH_OBJ)
26 CFLAGS-powerpc = $(SSP_ALL_CFLAGS)
29 # Create 'tcb-offsets.h' header file.
31 CFLAGS-tcb-offsets.c = -S
33 $(PTHREAD_ARCH_OUT)/tcb-offsets.c: $(PTHREAD_ARCH_DIR)/tcb-offsets.sym
34 $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
36 $(PTHREAD_ARCH_OUT)/tcb-offsets.s: $(PTHREAD_ARCH_OUT)/tcb-offsets.c
39 $(PTHREAD_ARCH_OUT)/tcb-offsets.h: $(PTHREAD_ARCH_OUT)/tcb-offsets.s
40 $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@
42 pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(PTHREAD_ARCH_OUT)/tcb-offsets.h
44 nptl_arch_headers_clean:
45 $(RM) $(PTHREAD_ARCH_OUT)/tcb-offsets.c \
46 $(PTHREAD_ARCH_OUT)/tcb-offsets.s \
47 $(PTHREAD_ARCH_OUT)/tcb-offsets.h
50 $(RM) $(PTHREAD_ARCH_OUT)/*.{o,os,oS}