From 3a7ac9c7a7b4d6181d3cd70a9cb85d93a1938238 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 12 Oct 2005 16:12:36 +0000 Subject: Rewrote almost all Makefiles: do not use strip $(x),y; run strip on all objects at once; use :=//$ $(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 -- cgit v1.2.3