summaryrefslogtreecommitdiff
path: root/libc/string
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-12 16:12:36 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-12 16:12:36 +0000
commit3a7ac9c7a7b4d6181d3cd70a9cb85d93a1938238 (patch)
treef87aedb508cd30ff8d50b75dbe832d34ac5dad85 /libc/string
parentb0c8130cec05f40ce926058d18fbc520b1a0e856 (diff)
Rewrote almost all Makefiles: do not use strip $(x),y; run strip on all objects at once; use :=//$</$^; use CRT_SRC/CRT_OBJ/SCRT_OBJ/CSRC/COBJ/SSRC/SOBJ/MSRC/MOBJ where no more is needed, if only CSRC is present use OBJS directly instead of COBJ; CTOR_TARGETS are created directly in lib; remove unused/unneeded parts. Hope I haven't broken too much.
Diffstat (limited to 'libc/string')
-rw-r--r--libc/string/Makefile28
-rw-r--r--libc/string/arm/Makefile17
-rw-r--r--libc/string/frv/Makefile17
-rw-r--r--libc/string/generic/Makefile18
-rw-r--r--libc/string/i386/Makefile19
-rw-r--r--libc/string/mips/Makefile17
-rw-r--r--libc/string/powerpc/Makefile19
-rw-r--r--libc/string/sh64/Makefile17
-rw-r--r--libc/string/sparc/Makefile23
-rw-r--r--libc/string/x86_64/Makefile23
10 files changed, 96 insertions, 102 deletions
diff --git a/libc/string/Makefile b/libc/string/Makefile
index 576f915af..428902369 100644
--- a/libc/string/Makefile
+++ b/libc/string/Makefile
@@ -22,8 +22,8 @@ endif
ALL_SUBDIRS = generic arm frv i386 mips powerpc sh64 sparc x86_64
-MSRC= wstring.c
-MOBJ= basename.o bcopy.o bzero.o dirname.o ffs.o memccpy.o memchr.o memcmp.o \
+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 \
stpncpy.o strcasecmp.o strcasestr.o strcat.o strchrnul.o strchr.o \
strcmp.o strcpy.o strcspn.o strdup.o strlen.o strncasecmp.o strncat.o \
@@ -33,15 +33,15 @@ MOBJ= basename.o bcopy.o bzero.o dirname.o ffs.o memccpy.o memchr.o memcmp.o \
_string_syssigmsgs.o sys_siglist.o strsignal.o psignal.o \
__xpg_basename.o strlcat.o strlcpy.o sys_errlist.o memmem.o
-MOBJW= wcscasecmp.o wcscat.o wcschrnul.o wcschr.o wcscmp.o wcscpy.o wcscspn.o \
+MOBJW = wcscasecmp.o wcscat.o wcschrnul.o wcschr.o wcscmp.o wcscpy.o wcscspn.o \
wcsdup.o wcslen.o wcsncasecmp.o wcsncat.o wcsncmp.o wcsncpy.o \
wcsnlen.o wcspbrk.o wcsrchr.o wcsspn.o wcsstr.o wcstok.o wmemchr.o \
wmemcmp.o wmemcpy.o wmemmove.o wmempcpy.o wmemset.o wcpcpy.o wcpncpy.o \
__wcslcpy.o \
wcsxfrm.o strxfrm.o # wcscoll strcoll.o
-MOBJx=
-MOBJWx=
+MOBJx =
+MOBJWx =
ifeq ($(UCLIBC_HAS_XLOCALE),y)
MOBJx += strcasecmp_l.o strncasecmp_l.o
@@ -50,46 +50,42 @@ endif
#ffsl ffsll
-OBJS=$(MOBJ) $(MOBJx)
+OBJS = $(MOBJ) $(MOBJx)
ifeq ($(UCLIBC_HAS_WCHAR),y)
OBJS += $(MOBJW) $(MOBJWx)
endif
-OBJ_LIST=../obj.string
+OBJ_LIST := ../obj.string
-all: $(OBJ_LIST) subdirs
+all: subdirs
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/%, $^) > $@
$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(MOBJx): $(MSRC)
$(CC) $(CFLAGS) -DL_$* -D__UCLIBC_DO_XLOCALE $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(MOBJW): $(MSRC)
$(CC) $(CFLAGS) -DWANT_WIDE -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(MOBJWx): $(MSRC)
$(CC) $(CFLAGS) -DWANT_WIDE -DL_$* -D__UCLIBC_DO_XLOCALE $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean: subdirs_clean
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
subdirs: $(patsubst %, _dir_%, $(DIRS))
subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
-$(patsubst %, _dir_%, $(DIRS)) : $(OBJS)
+$(patsubst %, _dir_%, $(DIRS)) : $(OBJ_LIST)
$(MAKE) -C $(patsubst _dir_%, %, $@)
$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
diff --git a/libc/string/arm/Makefile b/libc/string/arm/Makefile
index a874eb96d..fecc8fc1c 100644
--- a/libc/string/arm/Makefile
+++ b/libc/string/arm/Makefile
@@ -19,21 +19,22 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-SSRC= _memcpy.S bcopy.S bzero.S memcmp.S memcpy.S memmove.S memset.S \
+SSRC := _memcpy.S bcopy.S bzero.S memcmp.S memcpy.S memmove.S memset.S \
strcmp.S strlen.S strncmp.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
-OBJS=$(SOBJS)
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-OBJ_LIST=../../obj.string.$(TARGET_ARCH)
+OBJS := $(SOBJ)
+
+OBJ_LIST := ../../obj.string.$(TARGET_ARCH)
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/$(TARGET_ARCH)/%, $^) > $@
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/string/frv/Makefile b/libc/string/frv/Makefile
index 36682c94c..2c837a404 100644
--- a/libc/string/frv/Makefile
+++ b/libc/string/frv/Makefile
@@ -19,20 +19,21 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-SSRC=memcpy.S memset.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
-OBJS=$(SOBJS)
+SSRC := memcpy.S memset.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-OBJ_LIST=../../obj.string.$(TARGET_ARCH)
+OBJS := $(SOBJ)
+
+OBJ_LIST := ../../obj.string.$(TARGET_ARCH)
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/$(TARGET_ARCH)/%, $^) > $@
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/string/generic/Makefile b/libc/string/generic/Makefile
index fac678a59..36039e488 100644
--- a/libc/string/generic/Makefile
+++ b/libc/string/generic/Makefile
@@ -19,28 +19,22 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC= memchr.c memcmp.c memcpy.c memmem.c memmove.c mempcpy.c memrchr.c \
+CSRC := memchr.c memcmp.c memcpy.c memmem.c memmove.c mempcpy.c memrchr.c \
memset.c rawmemchr.c strcat.c strchr.c strchrnul.c strcmp.c strcpy.c \
strcspn.c strlen.c strncat.c strncmp.c strncpy.c strnlen.c \
strrchr.c strsep.c strspn.c strstr.c strtok_r.c
-
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+OBJS := $(patsubst %.c,%.o, $(CSRC))
OBJ_LIST=../../obj.string.generic
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/generic/%, $(OBJS)) > $(OBJ_LIST)
-
-# $(MOBJ): $(MSRC)
-# $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
-# $(STRIPTOOL) -x -R .note -R .comment $*.o
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/generic/%, $(OBJS)) > $@
-$(COBJS): %.o : %.c
+$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/string/i386/Makefile b/libc/string/i386/Makefile
index d2baa7dd8..f0bc8c4c1 100644
--- a/libc/string/i386/Makefile
+++ b/libc/string/i386/Makefile
@@ -19,26 +19,23 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC= string.c
-MOBJ= strcpy.o strncpy.o strcat.o strncat.o strcmp.o \
+MSRC := string.c
+MOBJ := strcpy.o strncpy.o strcat.o strncat.o strcmp.o \
strncmp.o strchr.o strrchr.o strlen.o strnlen.o \
memcpy.o memmove.o memchr.o memset.o
-OBJS=$(MOBJ)
-OBJ_LIST=../../obj.string.$(TARGET_ARCH)
+OBJS := $(MOBJ)
+
+OBJ_LIST := ../../obj.string.$(TARGET_ARCH)
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/$(TARGET_ARCH)/%, $^) > $@
$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-$(COBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/string/mips/Makefile b/libc/string/mips/Makefile
index a6d7d4a4b..3a07fbe0f 100644
--- a/libc/string/mips/Makefile
+++ b/libc/string/mips/Makefile
@@ -19,20 +19,21 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-SSRC= memcpy.S memset.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
-OBJS=$(SOBJS)
+SSRC := memcpy.S memset.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-OBJ_LIST=../../obj.string.$(TARGET_ARCH)
+OBJS := $(SOBJ)
+
+OBJ_LIST := ../../obj.string.$(TARGET_ARCH)
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/$(TARGET_ARCH)/%, $^) > $@
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/string/powerpc/Makefile b/libc/string/powerpc/Makefile
index c1b0ba184..b6a758187 100644
--- a/libc/string/powerpc/Makefile
+++ b/libc/string/powerpc/Makefile
@@ -19,24 +19,21 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC= string.c
-MOBJ= memcpy.o memmove.o memset.o bzero.o
-OBJS=$(MOBJ)
+MSRC := string.c
+MOBJ := memcpy.o memmove.o memset.o bzero.o
-OBJ_LIST=../../obj.string.$(TARGET_ARCH)
+OBJS := $(MOBJ)
+
+OBJ_LIST := ../../obj.string.$(TARGET_ARCH)
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/$(TARGET_ARCH)/%, $^) > $@
$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-$(COBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/string/sh64/Makefile b/libc/string/sh64/Makefile
index 0a7ee0ba2..b060c4c93 100644
--- a/libc/string/sh64/Makefile
+++ b/libc/string/sh64/Makefile
@@ -19,20 +19,21 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-SSRC= memcpy.S memset.S strcpy.S strlen.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
-OBJS=$(SOBJS)
+SSRC := memcpy.S memset.S strcpy.S strlen.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-OBJ_LIST=../../obj.string.$(TARGET_ARCH)
+OBJS := $(SOBJ)
+
+OBJ_LIST := ../../obj.string.$(TARGET_ARCH)
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/$(TARGET_ARCH)/%, $^) > $@
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/string/sparc/Makefile b/libc/string/sparc/Makefile
index 2215a6025..593158979 100644
--- a/libc/string/sparc/Makefile
+++ b/libc/string/sparc/Makefile
@@ -8,24 +8,27 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRCS = $(wildcard *.c)
-COBJS = $(patsubst %.c,%.o,$(CSRCS))
+CSRC := $(wildcard *.c)
+COBJ := $(patsubst %.c,%.o,$(CSRC))
-SSRCS = $(wildcard *.S)
-SOBJS = $(patsubst %.S,%.o,$(SSRCS))
+SSRC := $(wildcard *.S)
+SOBJ := $(patsubst %.S,%.o,$(SSRC))
-OBJS = $(COBJS) $(SOBJS)
+OBJS := $(COBJ) $(SOBJ)
-OBJ_LIST = ../../obj.string.$(TARGET_ARCH)
+OBJ_LIST := ../../obj.string.$(TARGET_ARCH)
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/$(TARGET_ARCH)/%, $^) > $@
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+
+$(SOBJ): %.o : %.S
+ $(CC) $(ASFLAGS) -c $< -o $@
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/string/x86_64/Makefile b/libc/string/x86_64/Makefile
index 2215a6025..593158979 100644
--- a/libc/string/x86_64/Makefile
+++ b/libc/string/x86_64/Makefile
@@ -8,24 +8,27 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRCS = $(wildcard *.c)
-COBJS = $(patsubst %.c,%.o,$(CSRCS))
+CSRC := $(wildcard *.c)
+COBJ := $(patsubst %.c,%.o,$(CSRC))
-SSRCS = $(wildcard *.S)
-SOBJS = $(patsubst %.S,%.o,$(SSRCS))
+SSRC := $(wildcard *.S)
+SOBJ := $(patsubst %.S,%.o,$(SSRC))
-OBJS = $(COBJS) $(SOBJS)
+OBJS := $(COBJ) $(SOBJ)
-OBJ_LIST = ../../obj.string.$(TARGET_ARCH)
+OBJ_LIST := ../../obj.string.$(TARGET_ARCH)
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, string/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, string/$(TARGET_ARCH)/%, $^) > $@
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+
+$(SOBJ): %.o : %.S
+ $(CC) $(ASFLAGS) -c $< -o $@
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core