[uClibc-cvs] uClibc/libc/string Makefile,1.54,1.55

Erik Andersen andersen at uclibc.org
Thu Nov 6 09:14:28 UTC 2003


Update of /var/cvs/uClibc/libc/string
In directory winder:/tmp/cvs-serv20749

Modified Files:
	Makefile 
Log Message:
Add some initial x86 string optimizations.  These make no attempt to use nifty
things like mmx/3dnow/etc.  These are not inline, and will therefore not be as
fast as modifying the headers to use inlines (and cannot therefore do tricky
things when dealing with const memory).  But they should (I hope!) be faster
than their generic equivalents....

More importantly, these should provide a good example for others to follow when
adding arch specific optimizations.
 -Erik


Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/libc/string/Makefile,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- Makefile	18 Oct 2003 10:19:27 -0000	1.54
+++ Makefile	6 Nov 2003 09:14:25 -0000	1.55
@@ -24,6 +24,12 @@
 TOPDIR=../../
 include $(TOPDIR)Rules.mak
 
+DIRS = 
+ifeq ($(TARGET_ARCH),$(wildcard $(TARGET_ARCH)))
+DIRS = $(TARGET_ARCH)
+endif
+ALL_SUBDIRS = i386
+
 MSRC= wstring.c
 MOBJ=  basename.o bcopy.o bzero.o dirname.o ffs.o memccpy.o memchr.o memcmp.o \
 	memcpy.o memmove.o mempcpy.o memrchr.o 	memset.o rawmemchr.o stpcpy.o \
@@ -58,7 +64,7 @@
 	OBJS += $(MOBJW) $(MOBJWx)
 endif
 
-all: $(OBJS) $(LIBC)
+all: $(OBJS) $(LIBC) subdirs
 
 $(LIBC): ar-target
 
@@ -85,6 +91,17 @@
 	$(CC) $(CFLAGS) -c $< -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
-clean:
+clean: subdirs_clean
 	$(RM) *.[oa] *~ core
 
+subdirs: $(patsubst %, _dir_%, $(DIRS))
+subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
+
+$(patsubst %, _dir_%, $(DIRS)) : dummy
+	$(MAKE) -C $(patsubst _dir_%, %, $@)
+
+$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
+	$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
+
+.PHONY: dummy
+




More information about the uClibc-cvs mailing list