From 337011435791b543f52786b085c3c5c298490acd Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 5 Dec 2003 20:39:51 +0000 Subject: Paul Mundt 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. --- libpthread/linuxthreads/Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'libpthread/linuxthreads/Makefile') diff --git a/libpthread/linuxthreads/Makefile b/libpthread/linuxthreads/Makefile index 7d62879eb..e43f05ea5 100644 --- a/libpthread/linuxthreads/Makefile +++ b/libpthread/linuxthreads/Makefile @@ -1,6 +1,7 @@ # Makefile for uClibc's pthread library # # Copyright (C) 2002 Erik Andersen +# Copyright (C) 2003 Paul Mundt # # 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 @@ OBJS=$(COBJS) all: $(OBJS) $(LIBPTHREAD) -$(LIBPTHREAD): ar-target +$(LIBPTHREAD): ar-target subdirs ar-target: $(OBJS) $(AR) $(ARFLAGS) $(LIBPTHREAD) $(OBJS) @@ -69,7 +72,17 @@ else $(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 -- cgit v1.2.3