From 44d0d21408e72de5ecbcf3d9831b3575eb8f7848 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 6 Nov 2003 09:14:26 +0000 Subject: 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 --- libc/string/Makefile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'libc/string/Makefile') diff --git a/libc/string/Makefile b/libc/string/Makefile index d9fec82a8..38b2eaae0 100644 --- a/libc/string/Makefile +++ b/libc/string/Makefile @@ -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 @@ ifeq ($(UCLIBC_HAS_WCHAR),y) OBJS += $(MOBJW) $(MOBJWx) endif -all: $(OBJS) $(LIBC) +all: $(OBJS) $(LIBC) subdirs $(LIBC): ar-target @@ -85,6 +91,17 @@ $(COBJS): %.o : %.c $(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 + -- cgit v1.2.3