summaryrefslogtreecommitdiff
path: root/libc/string/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-11-06 09:14:26 +0000
committerEric Andersen <andersen@codepoet.org>2003-11-06 09:14:26 +0000
commit44d0d21408e72de5ecbcf3d9831b3575eb8f7848 (patch)
tree2d65c0a97b72acac8925e87fa2b6c497a3327fd8 /libc/string/Makefile
parent9c071de3cf25b10b3c05815b819331c43a4e1822 (diff)
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
Diffstat (limited to 'libc/string/Makefile')
-rw-r--r--libc/string/Makefile21
1 files changed, 19 insertions, 2 deletions
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
+