[uClibc-cvs] uClibc/libpthread/linuxthreads Makefile,1.11,1.12

Erik Andersen andersen at uclibc.org
Fri Dec 5 20:39:48 UTC 2003


Update of /var/cvs/uClibc/libpthread/linuxthreads
In directory winder:/tmp/cvs-serv28214/libpthread/linuxthreads

Modified Files:
	Makefile 
Log Message:
Paul Mundt <lethal at linux-sh.org> writes:

This patch adds the libpthread backend bits for sh64. As noted previously,
we can't inline things like the testandset() in pt-machine.h as we need to
use a completely different ISA / CFLAGS in order for this to work.

As a result, this patch is somewhat of a RFC as well to see what people think
of the libpthread/linuxthreads/sysdeps Makefile approach, etc. The approach
I've taken currently has been to provide a sysdeps/Makefile with a note that
TARGET_ARCHs that want build rules can simply add themselves into the list of
matching architectures to add to the subdir rule for. This probably isn't
the cleanest solution, but it's quite transparent and works quite well.



Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/libpthread/linuxthreads/Makefile,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Makefile	18 Oct 2003 10:20:19 -0000	1.11
+++ Makefile	5 Dec 2003 20:39:42 -0000	1.12
@@ -1,6 +1,7 @@
 # Makefile for uClibc's pthread library
 #
 # Copyright (C) 2002 Erik Andersen <andersen at uclibc.org>
+# Copyright (C) 2003 Paul Mundt <lethal at linux-sh.org>
 #
 # This program is free software; you can redistribute it and/or modify it under
 # the terms of the GNU Library General Public License as published by the Free
@@ -20,6 +21,8 @@
 TOPDIR=../../
 include $(TOPDIR)Rules.mak
 
+DIRS = sysdeps
+
 #Adjust the soname version to avoid namespace collisions with glibc's libpthread
 LIBPTHREAD:=../libpthread.a
 ifeq ($(strip $(TARGET_ARCH)),sparc)
@@ -56,7 +59,7 @@
 
 all: $(OBJS) $(LIBPTHREAD)
 
-$(LIBPTHREAD): ar-target
+$(LIBPTHREAD): ar-target subdirs
 
 ar-target: $(OBJS)
 	$(AR) $(ARFLAGS) $(LIBPTHREAD) $(OBJS)
@@ -69,7 +72,17 @@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 endif
 
-clean:
+clean: subdirs_clean
 	$(RM) *.[oa] *~ core
 
+subdirs: $(patsubst %, _dir_%, $(DIRS))
+subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
+
+$(patsubst %, _dir_%, $(DIRS)) : dummy
+	$(MAKE) -C $(patsubst _dir_%, %, $@)
+
+$(patsubst %, _dirclean_%, $(DIRS)) : dummy
+	$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
+
+.PHONY: dummy subdirs
 




More information about the uClibc-cvs mailing list