diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-10-04 00:33:54 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-10-04 00:33:54 +0000 |
commit | f3cacffe54fb2644fcf6dee57b5768af4e32e797 (patch) | |
tree | 4dd45d30b15b64a2074d2aea15a1b26f493e55b1 /libpthread/nptl/sysdeps/pthread | |
parent | 61044293e40d58523315342c0521eec46d1994c6 (diff) | |
download | uClibc-alpine-f3cacffe54fb2644fcf6dee57b5768af4e32e797.tar.bz2 uClibc-alpine-f3cacffe54fb2644fcf6dee57b5768af4e32e797.tar.xz |
Fix up build system for NPTL. I admit it is much cleaner now, but I lost my entire Saturday fixing this $!#$!#@$T! up.
Diffstat (limited to 'libpthread/nptl/sysdeps/pthread')
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/Makefile | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile b/libpthread/nptl/sysdeps/pthread/Makefile index fae8f0800..280db89f1 100644 --- a/libpthread/nptl/sysdeps/pthread/Makefile +++ b/libpthread/nptl/sysdeps/pthread/Makefile @@ -42,25 +42,34 @@ CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE -COBJ-LIBP-ST = $(patsubst %.c, %.o, $(CSRC)) -COBJ-LIBP-SH = $(patsubst %.c, %.os, $(CSRC)) +AR_LIBP_COBJS = $(patsubst %.c, %.o, $(CSRC)) +SO_LIBP_COBJS = $(patsubst %.c, %.os, $(CSRC)) -ar-target all: $(COBJ-LIBP-ST) $(COBJ-LIBP-SH) +all: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) + +$(AR_LIB_NAME): $(AR_LIBP_COBJS) +ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) + $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(AR_LIBP_COBJS) +else + $(STRIPTOOL) -x -R .note -R .comment $(AR_LIBP_COBJS) +endif + $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(AR_LIBP_COBJS) + +$(AR_SO_LIB_NAME): $(SO_LIBP_COBJS) ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment \ - $(COBJ-LIBP-ST) $(COBJ-LIBP-SH) + $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(SO_LIBP_COBJS) else - $(STRIPTOOL) -x -R .note -R .comment \ - $(COBJ-LIBP-ST) $(COBJ-LIBP-SH) + $(STRIPTOOL) -x -R .note -R .comment $(SO_LIBP_COBJS) endif - $(AR) $(ARFLAGS) $(PTDIR)../$(LIBPTHREAD_STATIC_ARCHIVE) $(COBJ-LIBP-ST) - $(AR) $(ARFLAGS) $(PTDIR)../$(LIBPTHREAD_SHARED_ARCHIVE) $(COBJ-LIBP-SH) + $(AR) $(ARFLAGS) $(AR_SO_LIB_NAME) $(SO_LIBP_COBJS) -$(COBJ-LIBP-ST): %.o : %.c +$(AR_LIBP_COBJS): %.o : %.c $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -c $< -o $@ -$(COBJ-LIBP-SH): %.os : %.c +$(SO_LIBP_COBJS): %.os : %.c $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -DSHARED -c $< -o $@ clean: $(RM) *.o *.os *~ core + +.PHONY: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) |