summaryrefslogtreecommitdiff
path: root/libc
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
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')
-rw-r--r--libc/Makefile4
-rw-r--r--libc/inet/Makefile47
-rw-r--r--libc/inet/rpc/Makefile30
-rw-r--r--libc/misc/Makefile15
-rw-r--r--libc/misc/assert/Makefile15
-rw-r--r--libc/misc/ctype/Makefile19
-rw-r--r--libc/misc/dirent/Makefile16
-rw-r--r--libc/misc/error/Makefile15
-rw-r--r--libc/misc/file/Makefile19
-rw-r--r--libc/misc/fnmatch/Makefile15
-rw-r--r--libc/misc/ftw/Makefile17
-rw-r--r--libc/misc/glob/Makefile15
-rw-r--r--libc/misc/gnu/Makefile15
-rw-r--r--libc/misc/internals/Makefile22
-rw-r--r--libc/misc/intl/Makefile17
-rw-r--r--libc/misc/locale/Makefile20
-rw-r--r--libc/misc/mntent/Makefile15
-rw-r--r--libc/misc/pthread/Makefile19
-rw-r--r--libc/misc/regex/Makefile15
-rw-r--r--libc/misc/search/Makefile36
-rw-r--r--libc/misc/statfs/Makefile18
-rw-r--r--libc/misc/syslog/Makefile17
-rw-r--r--libc/misc/sysvipc/Makefile46
-rw-r--r--libc/misc/time/Makefile22
-rw-r--r--libc/misc/ttyent/Makefile15
-rw-r--r--libc/misc/utmp/Makefile15
-rw-r--r--libc/misc/wchar/Makefile22
-rw-r--r--libc/misc/wctype/Makefile15
-rw-r--r--libc/misc/wordexp/Makefile15
-rw-r--r--libc/pwd_grp/Makefile25
-rw-r--r--libc/signal/Makefile15
-rw-r--r--libc/stdio/Makefile31
-rw-r--r--libc/stdlib/Makefile47
-rw-r--r--libc/stdlib/malloc-simple/Makefile15
-rw-r--r--libc/stdlib/malloc-standard/Makefile24
-rw-r--r--libc/stdlib/malloc/Makefile15
-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
-rw-r--r--libc/sysdeps/linux/alpha/Makefile57
-rw-r--r--libc/sysdeps/linux/arm/Makefile58
-rw-r--r--libc/sysdeps/linux/bfin/Makefile57
-rw-r--r--libc/sysdeps/linux/common/Makefile23
-rw-r--r--libc/sysdeps/linux/cris/Makefile61
-rw-r--r--libc/sysdeps/linux/e1/Makefile61
-rw-r--r--libc/sysdeps/linux/frv/Makefile47
-rw-r--r--libc/sysdeps/linux/h8300/Makefile60
-rw-r--r--libc/sysdeps/linux/i386/Makefile58
-rw-r--r--libc/sysdeps/linux/i960/Makefile59
-rw-r--r--libc/sysdeps/linux/m68k/Makefile66
-rw-r--r--libc/sysdeps/linux/microblaze/Makefile63
-rw-r--r--libc/sysdeps/linux/mips/Makefile58
-rw-r--r--libc/sysdeps/linux/nios/Makefile56
-rw-r--r--libc/sysdeps/linux/nios2/Makefile59
-rw-r--r--libc/sysdeps/linux/powerpc/Makefile59
-rw-r--r--libc/sysdeps/linux/sh/Makefile58
-rw-r--r--libc/sysdeps/linux/sh64/Makefile61
-rw-r--r--libc/sysdeps/linux/sparc/Makefile52
-rw-r--r--libc/sysdeps/linux/v850/Makefile61
-rw-r--r--libc/sysdeps/linux/x86_64/Makefile58
-rw-r--r--libc/termios/Makefile21
-rw-r--r--libc/unistd/Makefile49
69 files changed, 918 insertions, 1285 deletions
diff --git a/libc/Makefile b/libc/Makefile
index 643d5f09e..a5f8954b8 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -43,7 +43,7 @@ AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
SO_FULL_NAME = libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-ifeq ($(strip $(HAVE_SHARED)),y)
+ifeq ($(HAVE_SHARED),y)
all: $(SO_LIB_NAME)
else
all: $(AR_LIB_NAME)
@@ -98,7 +98,7 @@ $(SO_LIB_NAME): $(AR_LIB_NAME)
echo " * the static library, so try that secondarily. */" >> $@
#OUT_FORMAT:=$(shell $(LD) --verbose | grep OUTPUT_FORMAT | awk -F '"' '{print $2}')
#echo "OUTPUT_FORMAT($(OUT_FORMAT))" >> $@
-ifeq ($(strip $(COMPAT_ATEXIT)),y)
+ifeq ($(COMPAT_ATEXIT),y)
echo "GROUP ( $(TOPDIR)lib/$(NONSHARED_LIBNAME) $(TOPDIR)lib/$(SHARED_MAJORNAME) )" >> $@
else
echo "GROUP ( $(TOPDIR)lib/$(SHARED_MAJORNAME) $(TOPDIR)lib/$(NONSHARED_LIBNAME) )" >> $@
diff --git a/libc/inet/Makefile b/libc/inet/Makefile
index 6d59e1856..e5c355d69 100644
--- a/libc/inet/Makefile
+++ b/libc/inet/Makefile
@@ -24,19 +24,23 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-ifeq ($(strip $(UCLIBC_HAS_RPC)),y)
- DIRS=rpc
-else
- DIRS=
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
endif
+
ALL_SUBDIRS = rpc
-MSRC=addr.c
-MOBJ=inet_aton.o inet_addr.o inet_ntoa.o inet_makeaddr.o inet_lnaof.o \
+DIRS =
+ifeq ($(UCLIBC_HAS_RPC),y)
+DIRS += rpc
+endif
+
+MSRC := addr.c
+MOBJ := inet_aton.o inet_addr.o inet_ntoa.o inet_makeaddr.o inet_lnaof.o \
inet_netof.o
-MSRC2=resolv.c
-MOBJ2=encodeh.o decodeh.o encoded.o decoded.o lengthd.o encodeq.o \
+MSRC2 := resolv.c
+MOBJ2 := encodeh.o decodeh.o encoded.o decoded.o lengthd.o encodeq.o \
decodeq.o lengthq.o encodea.o decodea.o encodep.o decodep.o \
formquery.o dnslookup.o resolveaddress.o opennameservers.o \
closenameservers.o resolvename.o gethostbyname.o res_init.o \
@@ -45,48 +49,41 @@ MOBJ2=encodeh.o decodeh.o encoded.o decoded.o lengthd.o encodeq.o \
gethostbyname_r.o gethostbyname2_r.o gethostbyaddr_r.o \
res_comp.o ns_name.o
-MSRC3=socketcalls.c
-MOBJ3= accept.o bind.o connect.o getpeername.o getsockname.o getsockopt.o \
+MSRC3 := socketcalls.c
+MOBJ3 := accept.o bind.o connect.o getpeername.o getsockname.o getsockopt.o \
listen.o recv.o recvfrom.o recvmsg.o send.o sendmsg.o sendto.o \
setsockopt.o shutdown.o socket.o socketpair.o
-CSRC =getservice.c getproto.c hostid.c getnetent.c getnetbynm.c getnetbyad.c \
+CSRC := getservice.c getproto.c hostid.c getnetent.c getnetbynm.c getnetbyad.c \
inet_net.c ntop.c herror.c if_nametoindex.c gai_strerror.c getaddrinfo.c \
in6_addr.c ether_addr.c ntohl.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-
-ifeq ($(UCLIBC_HAS_THREADS),y)
-CFLAGS += $(PTINC)
-endif
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJS)
+OBJS := $(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJ)
-OBJ_LIST=../obj.inet
+OBJ_LIST := ../obj.inet
all: $(OBJ_LIST) subdirs
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, inet/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, inet/%, $^) > $@
$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(MOBJ2): $(MSRC2)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(MOBJ3): $(MSRC3)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(COBJ): %.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))
diff --git a/libc/inet/rpc/Makefile b/libc/inet/rpc/Makefile
index 72dba26c5..474ed6484 100644
--- a/libc/inet/rpc/Makefile
+++ b/libc/inet/rpc/Makefile
@@ -24,8 +24,12 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-ifeq ($(strip $(UCLIBC_HAS_FULL_RPC)),y)
-CSRC :=auth_none.c auth_unix.c authunix_prot.c bindresvport.c \
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
+ifeq ($(UCLIBC_HAS_FULL_RPC),y)
+CSRC := auth_none.c auth_unix.c authunix_prot.c bindresvport.c \
clnt_generic.c clnt_perror.c clnt_raw.c clnt_simple.c clnt_tcp.c \
clnt_udp.c rpc_dtablesize.c get_myaddress.c getrpcent.c getrpcport.c \
pmap_clnt.c pmap_getmaps.c pmap_getport.c pmap_prot.c \
@@ -37,7 +41,7 @@ CSRC :=auth_none.c auth_unix.c authunix_prot.c bindresvport.c \
rexec.c sa_len.c ruserpass.c rpc_thread.c
else
# For now, only compile the stuff needed to do an NFS mount....
-CSRC:=create_xid.c pmap_clnt.c pmap_getmaps.c pmap_getport.c \
+CSRC := create_xid.c pmap_clnt.c pmap_getmaps.c pmap_getport.c \
pmap_prot.c pmap_prot2.c clnt_simple.c clnt_perror.c \
clnt_tcp.c clnt_udp.c bindresvport.c authunix_prot.c \
auth_none.c auth_unix.c xdr.c xdr_array.c xdr_rec.c \
@@ -47,24 +51,18 @@ CSRC:=create_xid.c pmap_clnt.c pmap_getmaps.c pmap_getport.c \
getrpcent.c
endif
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-
-ifeq ($(UCLIBC_HAS_THREADS),y)
-CFLAGS += $(PTINC)
-endif
-
-OBJS=$(COBJS)
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.inet.rpc
+OBJ_LIST := ../../obj.inet.rpc
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, inet/rpc/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, inet/rpc/%, $^) > $@
-$(COBJS): %.o : %.c
- $(CC) $(CFLAGS) $(PTINC) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+$(OBJS): %.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/misc/Makefile b/libc/misc/Makefile
index 9d2d74a2b..e512467e8 100644
--- a/libc/misc/Makefile
+++ b/libc/misc/Makefile
@@ -28,25 +28,25 @@ include $(TOPDIR)Rules.mak
DIRS = assert ctype dirent file fnmatch internals \
mntent syslog time utmp sysvipc statfs \
error ttyent gnu search locale
-ifeq ($(strip $(UCLIBC_HAS_REGEX)),y)
+ifeq ($(UCLIBC_HAS_REGEX),y)
DIRS += regex
endif
-ifeq ($(strip $(UCLIBC_HAS_WORDEXP)),y)
+ifeq ($(UCLIBC_HAS_WORDEXP),y)
DIRS += wordexp
endif
-ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
+ifeq ($(UCLIBC_HAS_THREADS),y)
DIRS += pthread
endif
-ifeq ($(strip $(UCLIBC_HAS_WCHAR)),y)
+ifeq ($(UCLIBC_HAS_WCHAR),y)
DIRS += wctype wchar
endif
-ifeq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
+ifeq ($(UCLIBC_HAS_GETTEXT_AWARENESS),y)
DIRS += intl
endif
-ifeq ($(strip $(UCLIBC_HAS_FTW)),y)
+ifeq ($(UCLIBC_HAS_FTW),y)
DIRS += ftw
endif
-ifeq ($(strip $(UCLIBC_HAS_GLOB)),y)
+ifeq ($(UCLIBC_HAS_GLOB),y)
DIRS += glob
endif
@@ -56,7 +56,6 @@ tags:
ctags -R
clean: subdirs_clean
- $(RM) *.[oa] *~ core
subdirs: $(patsubst %, _dir_%, $(DIRS))
subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
diff --git a/libc/misc/assert/Makefile b/libc/misc/assert/Makefile
index 57a2c0154..cfc0b7dcc 100644
--- a/libc/misc/assert/Makefile
+++ b/libc/misc/assert/Makefile
@@ -24,20 +24,19 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=__assert.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := __assert.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.assert
+OBJ_LIST := ../../obj.misc.assert
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/assert/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/assert/%, $^) > $@
-$(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/misc/ctype/Makefile b/libc/misc/ctype/Makefile
index dd7b799bd..4dc944bfa 100644
--- a/libc/misc/ctype/Makefile
+++ b/libc/misc/ctype/Makefile
@@ -24,8 +24,8 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC=ctype.c
-MOBJ= isalnum.o isalpha.o isascii.o iscntrl.o isdigit.o \
+MSRC := ctype.c
+MOBJ = isalnum.o isalpha.o isascii.o iscntrl.o isdigit.o \
isgraph.o islower.o isprint.o ispunct.o isspace.o \
isupper.o isxdigit.o toascii.o tolower.o toupper.o \
isblank.o isxlower.o isxupper.o
@@ -36,33 +36,30 @@ MOBJ += __C_ctype_b.o __C_ctype_tolower.o __C_ctype_toupper.o \
__ctype_assert.o isctype.o
endif
-MOBJx= isalnum_l.o isalpha_l.o isascii_l.o iscntrl_l.o isdigit_l.o \
+MOBJx:= isalnum_l.o isalpha_l.o isascii_l.o iscntrl_l.o isdigit_l.o \
isgraph_l.o islower_l.o isprint_l.o ispunct_l.o isspace_l.o \
isupper_l.o isxdigit_l.o toascii_l.o tolower_l.o toupper_l.o \
isblank_l.o # isxlower_l.o isxupper_l.o
-OBJS=$(MOBJ)
+OBJS = $(MOBJ)
ifeq ($(UCLIBC_HAS_XLOCALE),y)
OBJS += $(MOBJx)
endif
-OBJ_LIST=../../obj.misc.ctype
+OBJ_LIST := ../../obj.misc.ctype
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/ctype/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/ctype/%, $^) > $@
$(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
-
-$(OBJS): Makefile
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/misc/dirent/Makefile b/libc/misc/dirent/Makefile
index 1f1032642..19ab29fb0 100644
--- a/libc/misc/dirent/Makefile
+++ b/libc/misc/dirent/Makefile
@@ -24,22 +24,22 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=alphasort.c closedir.c dirfd.c opendir.c readdir.c rewinddir.c scandir.c \
+CSRC := alphasort.c closedir.c dirfd.c opendir.c readdir.c rewinddir.c scandir.c \
seekdir.c telldir.c readdir64.c alphasort64.c scandir64.c readdir_r.c \
readdir64_r.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
-OBJ_LIST=../../obj.misc.dirent
+OBJS := $(patsubst %.c,%.o, $(CSRC))
+
+OBJ_LIST := ../../obj.misc.dirent
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/dirent/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/dirent/%, $^) > $@
-$(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/misc/error/Makefile b/libc/misc/error/Makefile
index 1ef71dfa7..05f6ca670 100644
--- a/libc/misc/error/Makefile
+++ b/libc/misc/error/Makefile
@@ -19,20 +19,19 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=error.c err.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := error.c err.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.error
+OBJ_LIST := ../../obj.misc.error
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/error/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/error/%, $^) > $@
-$(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/misc/file/Makefile b/libc/misc/file/Makefile
index a590f6ab5..90aecf6b7 100644
--- a/libc/misc/file/Makefile
+++ b/libc/misc/file/Makefile
@@ -24,24 +24,23 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-ifeq ($(strip $(UCLIBC_HAS_LFS)),y)
-CSRC = lockf.c lockf64.c
-else
CSRC = lockf.c
+ifeq ($(UCLIBC_HAS_LFS),y)
+CSRC += lockf64.c
endif
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
-OBJ_LIST=../../obj.misc.file
+OBJS=$(patsubst %.c,%.o, $(CSRC))
+
+OBJ_LIST := ../../obj.misc.file
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/file/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/file/%, $^) > $@
-$(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/misc/fnmatch/Makefile b/libc/misc/fnmatch/Makefile
index 535169550..0c2969dac 100644
--- a/libc/misc/fnmatch/Makefile
+++ b/libc/misc/fnmatch/Makefile
@@ -24,20 +24,19 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=fnmatch.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := fnmatch.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.fnmatch
+OBJ_LIST := ../../obj.misc.fnmatch
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/fnmatch/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/fnmatch/%, $^) > $@
-$(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/misc/ftw/Makefile b/libc/misc/ftw/Makefile
index a8d52bf32..c6b4ccc5a 100644
--- a/libc/misc/ftw/Makefile
+++ b/libc/misc/ftw/Makefile
@@ -19,24 +19,21 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=ftw.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+MSRC := ftw.c
+MOBJ := ftw.o ftw64.o
-MSRC=ftw.c
-MOBJ=ftw.o ftw64.o
-OBJS=$(MOBJ)
+OBJS := $(MOBJ)
-OBJ_LIST=../../obj.misc.ftw
+OBJ_LIST := ../../obj.misc.ftw
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/ftw/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/ftw/%, $^) > $@
$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/misc/glob/Makefile b/libc/misc/glob/Makefile
index e753c936a..0933d0516 100644
--- a/libc/misc/glob/Makefile
+++ b/libc/misc/glob/Makefile
@@ -24,22 +24,21 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=glob.c glob64.c glob-hooks.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := glob.c glob64.c glob-hooks.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.glob
+OBJ_LIST := ../../obj.misc.glob
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/glob/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/glob/%, $^) > $@
-$(COBJS): %.o : %.c
+$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
glob64.o: glob64.c glob.c
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/misc/gnu/Makefile b/libc/misc/gnu/Makefile
index a338b8131..4bc62d37e 100644
--- a/libc/misc/gnu/Makefile
+++ b/libc/misc/gnu/Makefile
@@ -24,20 +24,19 @@
TOPDIR=../../../
include $(TOPDIR)R