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)Rules.mak
-CSRC=obstack.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := obstack.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.gnu
+OBJ_LIST := ../../obj.misc.gnu
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/gnu/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/gnu/%, $^) > $@
-$(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/internals/Makefile b/libc/misc/internals/Makefile
index fc5ca267b..52fd45a44 100644
--- a/libc/misc/internals/Makefile
+++ b/libc/misc/internals/Makefile
@@ -24,25 +24,23 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=__uClibc_main.c tempname.c errno.c __errno_location.c __h_errno_location.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-
-ifeq ($(UCLIBC_HAS_SSP),y)
-__uClibc_main.o: CFLAGS += $(SSP_DISABLE_FLAGS)
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
endif
-OBJS=$(COBJS)
+CSRC := __uClibc_main.c tempname.c errno.c __errno_location.c __h_errno_location.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-ifeq ($(UCLIBC_HAS_THREADS),y)
-CFLAGS += $(PTINC)
+ifeq ($(UCLIBC_HAS_SSP),y)
+__uClibc_main.o: CFLAGS += $(SSP_DISABLE_FLAGS)
endif
-OBJ_LIST=../../obj.misc.internals
+OBJ_LIST := ../../obj.misc.internals
all: $(OBJ_LIST) interp.o static.o
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/internals/%, $(OBJS)) > $(OBJ_LIST)
+ echo $(patsubst %, misc/internals/%, $^) > $@
interp.c: Makefile
echo "/* Force shared libraries to know about the correct library loader */" > interp.c
@@ -52,9 +50,9 @@ interp.c: Makefile
"(\".interp\"))) =\""$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)"\";" >> interp.c
echo "#endif" >> interp.c
-$(COBJS) interp.o static.o: %.o : %.c
+$(OBJS) interp.o static.o: %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] interp.c *~ core
+ $(RM) *.o interp.c *~ core
diff --git a/libc/misc/intl/Makefile b/libc/misc/intl/Makefile
index e0eb06493..4cedc491e 100644
--- a/libc/misc/intl/Makefile
+++ b/libc/misc/intl/Makefile
@@ -24,26 +24,25 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC= intl.c
-MOBJ= __uClibc_dgettext.o __uClibc_dcgettext.o \
+MSRC := intl.c
+MOBJ := __uClibc_dgettext.o __uClibc_dcgettext.o \
__uClibc_textdomain.o __uClibc_bindtextdomain.o # for libstd++
-OBJS=$(MOBJ)
+OBJS := $(MOBJ)
-OBJ_LIST=../../obj.misc.intl
+OBJ_LIST := ../../obj.misc.intl
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/intl/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/intl/%, $^) > $@
$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(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/locale/Makefile b/libc/misc/locale/Makefile
index 5ab005538..7b8b35ac3 100644
--- a/libc/misc/locale/Makefile
+++ b/libc/misc/locale/Makefile
@@ -24,9 +24,9 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC= locale.c
-MOBJ= setlocale.o localeconv.o _locale_init.o nl_langinfo.o
-MOBJx=
+MSRC := locale.c
+MOBJ = setlocale.o localeconv.o _locale_init.o nl_langinfo.o
+MOBJx =
ifeq ($(UCLIBC_HAS_LOCALE),y)
MOBJ += newlocale.o __locale_mbrtowc_l.o
@@ -41,31 +41,27 @@ ifeq ($(UCLIBC_HAS_LOCALE),y)
DATA = locale_data.o
endif
-OBJS= $(MOBJ) $(MOBJx) $(DATA)
+OBJS := $(MOBJ) $(MOBJx) $(DATA)
-OBJ_LIST=../../obj.misc.locale
+OBJ_LIST := ../../obj.misc.locale
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/locale/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/locale/%, $^) > $@
$(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
locale_data.o:
$(LN) -sf ../../../extra/locale/locale_data.c
$(CC) $(CFLAGS) -c -D__WCHAR_ENABLED -I../../../extra/locale locale_data.c -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-$(OBJS): Makefile
clean:
- $(RM) *.[oa] *~ core locale_data.c
+ $(RM) *.o *~ core locale_data.c
.PHONY: data
diff --git a/libc/misc/mntent/Makefile b/libc/misc/mntent/Makefile
index 34a3d6f71..871e3e61e 100644
--- a/libc/misc/mntent/Makefile
+++ b/libc/misc/mntent/Makefile
@@ -24,20 +24,19 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=mntent.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := mntent.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.mntent
+OBJ_LIST := ../../obj.misc.mntent
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/mntent/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/mntent/%, $^) > $@
-$(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/pthread/Makefile b/libc/misc/pthread/Makefile
index e222e1442..1230e44fe 100644
--- a/libc/misc/pthread/Makefile
+++ b/libc/misc/pthread/Makefile
@@ -19,20 +19,21 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=no-tsd.c weaks.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CFLAGS += $(PTINC)
-OBJ_LIST=../../obj.misc.pthread
+CSRC := no-tsd.c weaks.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
+
+OBJ_LIST := ../../obj.misc.pthread
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/pthread/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/pthread/%, $^) > $@
-$(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/regex/Makefile b/libc/misc/regex/Makefile
index db215edd8..2df62dd44 100644
--- a/libc/misc/regex/Makefile
+++ b/libc/misc/regex/Makefile
@@ -24,20 +24,19 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=regex.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := regex.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.regex
+OBJ_LIST := ../../obj.misc.regex
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/regex/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/regex/%, $^) > $@
-$(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/search/Makefile b/libc/misc/search/Makefile
index 7e67bb4e5..ce0c1b6b1 100644
--- a/libc/misc/search/Makefile
+++ b/libc/misc/search/Makefile
@@ -24,49 +24,45 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC1=tsearch.c
-MOBJ1=tsearch.o tfind.o tdelete.o twalk.o tdestroy.o
+MSRC1 := tsearch.c
+MOBJ1 := tsearch.o tfind.o tdelete.o twalk.o tdestroy.o
-MSRC2=lsearch.c
-MOBJ2=lfind.o lsearch.o
+MSRC2 := lsearch.c
+MOBJ2 := lfind.o lsearch.o
-MSRC3=insremque.c
-MOBJ3=insque.o remque.o
+MSRC3 := insremque.c
+MOBJ3 := insque.o remque.o
-MSRC4=hsearch_r.c
-MOBJ4=hcreate_r.o hdestroy_r.o hsearch_r.o
+MSRC4 := hsearch_r.c
+MOBJ4 := hcreate_r.o hdestroy_r.o hsearch_r.o
-CSRC=hsearch.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := hsearch.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS) $(MOBJ1) $(MOBJ2) $(MOBJ3) $(MOBJ4)
+OBJS := $(COBJ) $(MOBJ1) $(MOBJ2) $(MOBJ3) $(MOBJ4)
-OBJ_LIST=../../obj.misc.search
+OBJ_LIST := ../../obj.misc.search
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/search/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/search/%, $^) > $@
$(MOBJ1): $(MSRC1)
$(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
$(MOBJ4): $(MSRC4)
$(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:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/misc/statfs/Makefile b/libc/misc/statfs/Makefile
index bbb9dd0bc..f91b619fa 100644
--- a/libc/misc/statfs/Makefile
+++ b/libc/misc/statfs/Makefile
@@ -22,24 +22,22 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-ifeq ($(strip $(UCLIBC_HAS_LFS)),y)
-CSRC = fstatfs64.c statfs64.c statvfs.c statvfs64.c fstatvfs.c fstatvfs64.c
-else
CSRC = statvfs.c fstatvfs.c
+ifeq ($(UCLIBC_HAS_LFS),y)
+CSRC += fstatfs64.c statfs64.c statvfs64.c fstatvfs64.c
endif
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.statfs
+OBJ_LIST := ../../obj.misc.statfs
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/statfs/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/statfs/%, $^) > $@
-$(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/syslog/Makefile b/libc/misc/syslog/Makefile
index 26239ab7b..525cc683d 100644
--- a/libc/misc/syslog/Makefile
+++ b/libc/misc/syslog/Makefile
@@ -24,24 +24,23 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=syslog.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
-
ifeq ($(UCLIBC_HAS_THREADS),y)
CFLAGS += $(PTINC)
endif
-OBJ_LIST=../../obj.misc.syslog
+CSRC := syslog.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
+
+OBJ_LIST := ../../obj.misc.syslog
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/syslog/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/syslog/%, $^) > $@
-$(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/sysvipc/Makefile b/libc/misc/sysvipc/Makefile
index 11aba5758..99b72c897 100644
--- a/libc/misc/sysvipc/Makefile
+++ b/libc/misc/sysvipc/Makefile
@@ -24,55 +24,39 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-DIRS=
+MSRC := sem.c
+MOBJ := semget.o semctl.o semop.o
-MSRC=sem.c
-MOBJ=semget.o semctl.o semop.o
+MSRC2 := shm.c
+MOBJ2 := shmat.o shmctl.o shmdt.o shmget.o
-MSRC2=shm.c
-MOBJ2=shmat.o shmctl.o shmdt.o shmget.o
+MSRC3 := msgq.c
+MOBJ3 := msgctl.o msgget.o msgrcv.o msgsnd.o
-MSRC3=msgq.c
-MOBJ3=msgctl.o msgget.o msgrcv.o msgsnd.o
+CSRC := ftok.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-CSRC = ftok.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+OBJS := $(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJ)
-OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJS)
-
-OBJ_LIST=../../obj.misc.sysvipc
+OBJ_LIST := ../../obj.misc.sysvipc
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/sysvipc/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/sysvipc/%, $^) > $@
$(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
-
-subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
-
-$(patsubst %, _dir_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dir_%, %, $@)
-
-$(patsubst %, _dirclean_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
-.PHONY: dummy
+clean:
+ $(RM) *.o *~ core
diff --git a/libc/misc/time/Makefile b/libc/misc/time/Makefile
index ebeea09e6..9d128fb09 100644
--- a/libc/misc/time/Makefile
+++ b/libc/misc/time/Makefile
@@ -24,12 +24,12 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC= time.c
-MOBJ= asctime.o asctime_r.o clock.o ctime.o ctime_r.o gmtime.o gmtime_r.o \
+MSRC := time.c
+MOBJ = asctime.o asctime_r.o clock.o ctime.o ctime_r.o gmtime.o gmtime_r.o \
localtime.o localtime_r.o mktime.o strftime.o strptime.o tzset.o \
_time_t2tm.o __time_tm.o _time_mktime.o dysize.o timegm.o \
_time_mktime_tzi.o _time_localtime_tzi.o
-MOBJx=
+MOBJx =
ifeq ($(UCLIBC_HAS_FLOATS),y)
MOBJ += difftime.o
@@ -45,29 +45,27 @@ ifeq ($(UCLIBC_HAS_XLOCALE),y)
endif
endif
-CSRC= adjtime.c ftime.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := adjtime.c ftime.c
+COBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS) $(MOBJ) $(MOBJx)
+OBJS := $(COBJS) $(MOBJ) $(MOBJx)
-OBJ_LIST=../../obj.misc.time
+OBJ_LIST := ../../obj.misc.time
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/time/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/time/%, $^) > $@
$(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
$(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/misc/ttyent/Makefile b/libc/misc/ttyent/Makefile
index 8aaf8e8e8..9a172775f 100644
--- a/libc/misc/ttyent/Makefile
+++ b/libc/misc/ttyent/Makefile
@@ -19,20 +19,19 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=getttyent.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := getttyent.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.ttyent
+OBJ_LIST := ../../obj.misc.ttyent
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/ttyent/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/ttyent/%, $^) > $@
-$(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/utmp/Makefile b/libc/misc/utmp/Makefile
index c4cab9e9b..c5e5fad11 100644
--- a/libc/misc/utmp/Makefile
+++ b/libc/misc/utmp/Makefile
@@ -24,20 +24,19 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=utent.c wtent.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := utent.c wtent.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.utmp
+OBJ_LIST := ../../obj.misc.utmp
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/utmp/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/utmp/%, $^) > $@
-$(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/wchar/Makefile b/libc/misc/wchar/Makefile
index 62b49f2ee..acff4dab6 100644
--- a/libc/misc/wchar/Makefile
+++ b/libc/misc/wchar/Makefile
@@ -24,13 +24,13 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC1= wchar.c
-MOBJ1= btowc.o wctob.o mbsinit.o mbrlen.o mbrtowc.o wcrtomb.o mbsrtowcs.o \
+MSRC := wchar.c
+MOBJ = btowc.o wctob.o mbsinit.o mbrlen.o mbrtowc.o wcrtomb.o mbsrtowcs.o \
wcsrtombs.o _wchar_utf8sntowcs.o _wchar_wcsntoutf8s.o \
__mbsnrtowcs.o __wcsnrtombs.o wcwidth.o wcswidth.o
ifeq ($(UCLIBC_HAS_LOCALE),y)
- MOBJ1 += iconv.o
+ MOBJ += iconv.o
endif
# The stdio and time related wide functions are now built in the normal
@@ -43,22 +43,18 @@ endif
# time:
# wcsftime
-OBJS=$(MOBJ1)
+OBJS := $(MOBJ)
-OBJ_LIST=../../obj.misc.wchar
+OBJ_LIST := ../../obj.misc.wchar
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/wchar/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/wchar/%, $^) > $@
-$(MOBJ1): $(MSRC1)
+$(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
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/misc/wctype/Makefile b/libc/misc/wctype/Makefile
index 8a842dce7..34cc2d966 100644
--- a/libc/misc/wctype/Makefile
+++ b/libc/misc/wctype/Makefile
@@ -24,8 +24,8 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC= wctype.c
-MOBJ= iswalnum.o iswalpha.o iswcntrl.o iswdigit.o iswgraph.o \
+MSRC := wctype.c
+MOBJ := iswalnum.o iswalpha.o iswcntrl.o iswdigit.o iswgraph.o \
iswlower.o iswprint.o iswpunct.o iswspace.o iswupper.o \
iswxdigit.o iswblank.o wctrans.o towctrans.o \
wctype.o iswctype.o towlower.o towupper.o
@@ -35,26 +35,25 @@ MOBJx= iswalnum_l.o iswalpha_l.o iswcntrl_l.o iswdigit_l.o iswgraph_l.o \
iswxdigit_l.o iswblank_l.o \
wctype_l.o iswctype_l.o wctrans_l.o towctrans_l.o towlower_l.o towupper_l.o
-OBJS=$(MOBJ)
+OBJS = $(MOBJ)
ifeq ($(UCLIBC_HAS_XLOCALE),y)
OBJS += $(MOBJx)
endif
-OBJ_LIST=../../obj.misc.wctype
+OBJ_LIST := ../../obj.misc.wctype
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/wctype/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/wctype/%, $^) > $@
$(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
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/misc/wordexp/Makefile b/libc/misc/wordexp/Makefile
index 6126be8bf..203a23ca2 100644
--- a/libc/misc/wordexp/Makefile
+++ b/libc/misc/wordexp/Makefile
@@ -19,20 +19,19 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-CSRC=wordexp.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+CSRC := wordexp.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.misc.wordexp
+OBJ_LIST := ../../obj.misc.wordexp
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, misc/wordexp/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, misc/wordexp/%, $^) > $@
-$(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/pwd_grp/Makefile b/libc/pwd_grp/Makefile
index 3b37e0052..226eb2654 100644
--- a/libc/pwd_grp/Makefile
+++ b/libc/pwd_grp/Makefile
@@ -24,8 +24,8 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-MSRC=pwd_grp.c
-MOBJ= fgetpwent_r.o fgetgrent_r.o fgetpwent.o fgetgrent.o \
+MSRC := pwd_grp.c
+MOBJ = fgetpwent_r.o fgetgrent_r.o fgetpwent.o fgetgrent.o \
getpwnam_r.o getgrnam_r.o getpwuid_r.o getgrgid_r.o \
getpwuid.o getgrgid.o getpwnam.o getgrnam.o getpw.o \
getpwent_r.o getgrent_r.o getpwent.o getgrent.o \
@@ -33,35 +33,32 @@ MOBJ= fgetpwent_r.o fgetgrent_r.o fgetpwent.o fgetgrent.o \
__parsepwent.o __parsegrent.o __pgsreader.o
ifeq ($(HAS_SHADOW),y)
-MOBJ+= fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \
+MOBJ += fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \
getspnam.o getspent_r.o getspent.o sgetspent.o \
putspent.o __parsespent.o # getspuid_r.o getspuid.o
endif
-CSRC=
+CSRC =
ifeq ($(HAS_SHADOW),y)
-CSRC+= lckpwdf.c
+CSRC += lckpwdf.c
endif
-COBJ=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(MOBJ) $(COBJ)
+COBJ := $(patsubst %.c,%.o, $(CSRC))
+OBJS := $(MOBJ) $(COBJ)
-OBJ_LIST=../obj.pwd_grp
+OBJ_LIST := ../obj.pwd_grp
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, pwd_grp/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, pwd_grp/%, $^) > $@
$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-$(OBJ): Makefile
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/signal/Makefile b/libc/signal/Makefile
index 2ce6216e9..962403cd9 100644
--- a/libc/signal/Makefile
+++ b/libc/signal/Makefile
@@ -19,26 +19,25 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-CSRC= allocrtsig.c killpg.c raise.c sigaction.c sigaddset.c sigandset.c \
+CSRC := allocrtsig.c killpg.c raise.c sigaction.c sigaddset.c sigandset.c \
sigblock.c sigdelset.c sigempty.c sigfillset.c siggetmask.c sighold.c \
sigignore.c sigintr.c sigisempty.c sigismem.c sigjmp.c signal.c \
sigorset.c sigpause.c sigrelse.c sigset.c sigsetmask.c sigsetops.c \
sysv_signal.c sigwait.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../obj.signal
+OBJ_LIST := ../obj.signal
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, signal/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, signal/%, $^) > $@
-$(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/stdio/Makefile b/libc/stdio/Makefile
index 91a011eed..e55f1038c 100644
--- a/libc/stdio/Makefile
+++ b/libc/stdio/Makefile
@@ -44,7 +44,7 @@ CSRC = fclose.c fcloseall.c fdopen.c fgetpos.c fopen.c freopen.c \
CSRC += _READ.c _WRITE.c _adjust_pos.c _fopen.c _fwrite.c \
_rfill.c _stdio.c _trans2r.c _trans2w.c _wcommit.c \
_cs_funcs.c _load_inttype.c _store_inttype.c _uintmaxtostr.c
-ifeq ($(strip $(UCLIBC_HAS_FLOATS)),y)
+ifeq ($(UCLIBC_HAS_FLOATS),y)
CSRC += _fpmaxtostr.c
endif
@@ -53,7 +53,7 @@ CSRC += __fbufsize.c __flbf.c __fpending.c __fpurge.c __freadable.c \
__freading.c __fsetlocking.c __fwritable.c __fwriting.c _flushlbf.c
# Other glibc extensions
-ifeq ($(strip $(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS)),y)
+ifeq ($(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS),y)
CSRC += fopencookie.c fmemopen.c open_memstream.c
endif
@@ -102,17 +102,17 @@ endif
CSRC += $(CUSRC)
-COBJS = $(patsubst %.c,%.o, $(CSRC))
+COBJ = $(patsubst %.c,%.o, $(CSRC))
CUOBJS = $(patsubst %.c,%_unlocked.o, $(CUSRC))
CWOBJS = $(patsubst %.c,%.o, $(CWSRC))
-ifeq ($(strip $(UCLIBC_HAS_WCHAR)),y)
-COBJS += $(CWOBJS)
+ifeq ($(UCLIBC_HAS_WCHAR),y)
+COBJ += $(CWOBJS)
endif
-OBJS = $(COBJS) $(CUOBJS) $(MOBJ2) $(MOBJ3) $(MWOBJ)
+OBJS = $(COBJ) $(CUOBJS) $(MOBJ2) $(MOBJ3) $(MWOBJ)
-ifeq ($(strip $(UCLIBC_HAS_LFS)),y)
+ifeq ($(UCLIBC_HAS_LFS),y)
OBJS += $(CLOBJS)
endif
@@ -120,38 +120,31 @@ ifeq ($(UCLIBC_HAS_THREADS),y)
CFLAGS += $(PTINC)
endif
-OBJ_LIST=../obj.stdio
+OBJ_LIST := ../obj.stdio
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, stdio/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, stdio/%, $^) > $@
-$(COBJS): %.o : %.c
+$(COBJ): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
%_unlocked.o : %.c
$(CC) $(CFLAGS) -D__DO_UNLOCKED -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
%64.o : %.c
$(CC) $(CFLAGS) -D__DO_LARGEFILE -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
$(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
$(MWOBJ): $(MWSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-$(OBJ): Makefile
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/stdlib/Makefile b/libc/stdlib/Makefile
index 49d739703..fa360e4c9 100644
--- a/libc/stdlib/Makefile
+++ b/libc/stdlib/Makefile
@@ -24,31 +24,28 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-DIRS:=
+DIRS =
ifeq ($(MALLOC),y)
- DIRS+=malloc
+ DIRS += malloc
endif
ifeq ($(MALLOC_SIMPLE),y)
- DIRS+=malloc-simple
+ DIRS += malloc-simple
endif
ifeq ($(MALLOC_STANDARD),y)
- DIRS+=malloc-standard
+ DIRS += malloc-standard
endif
-
-MSRC = stdlib.c
+MSRC := stdlib.c
MOBJ = abs.o labs.o atoi.o atol.o strtol.o strtoul.o _stdlib_strto_l.o \
qsort.o bsearch.o \
llabs.o atoll.o strtoll.o strtoull.o _stdlib_strto_ll.o
# (aliases) strtoq.o strtouq.o
ifeq ($(UCLIBC_HAS_XLOCALE),y)
-
-MOBJx =
-MOBJx += strtol_l.o strtoul_l.o _stdlib_strto_l_l.o \
+MOBJx = strtol_l.o strtoul_l.o _stdlib_strto_l_l.o \
strtoll_l.o strtoull_l.o _stdlib_strto_ll_l.o
endif
-MSRC1 = strtod.c
+MSRC1 := strtod.c
MOBJ1 =
MOBJ1x =
@@ -78,7 +75,7 @@ endif
# (aliases) wcstoq.o wcstouq.o
# wcstod wcstof wcstold
-MSRC2 = atexit.c
+MSRC2 := atexit.c
MOBJ2 = on_exit.o __cxa_atexit.o __cxa_finalize.o __exit_handler.o exit.o
ifeq ($(COMPAT_ATEXIT),y)
MOBJ2 += old_atexit.o
@@ -94,49 +91,43 @@ CSRC = \
ifeq ($(UCLIBC_HAS_FLOATS),y)
CSRC += drand48.c drand48_r.c erand48.c erand48_r.c
endif
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(MOBJ) $(MOBJx) $(MOBJ1) $(MOBJ1x) $(MOBJ2) $(COBJS)
+OBJS := $(MOBJ) $(MOBJx) $(MOBJ1) $(MOBJ1x) $(MOBJ2) $(COBJ)
-NONSHARED_OBJS=atexit.o
+NONSHARED_OBJS := atexit.o
-OBJ_LIST=../obj.stdlib
+OBJ_LIST := ../obj.stdlib
-NONSHARED_OBJ_LIST=../nonshared_obj.stdlib
+NONSHARED_OBJ_LIST := ../nonshared_obj.stdlib
all: $(OBJ_LIST) $(NONSHARED_OBJ_LIST) subdirs
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, stdlib/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, stdlib/%, $^) > $@
$(NONSHARED_OBJ_LIST): $(NONSHARED_OBJS)
- echo $(patsubst %, stdlib/%, $(NONSHARED_OBJS)) > $(NONSHARED_OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, stdlib/%, $^) > $@
$(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
$(MOBJ1): $(MSRC1)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(MOBJ1x): $(MSRC1)
$(CC) $(CFLAGS) -DL_$* -D__UCLIBC_DO_XLOCALE $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(MOBJ2) atexit.o: $(MSRC2)
$(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
-
-$(OBJ): Makefile
subdirs: $(patsubst %, _dir_%, $(DIRS))
subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
@@ -148,6 +139,6 @@ $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
clean: subdirs_clean
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
.PHONY: dummy
diff --git a/libc/stdlib/malloc-simple/Makefile b/libc/stdlib/malloc-simple/Makefile
index 161aece1a..6f2d25e42 100644
--- a/libc/stdlib/malloc-simple/Makefile
+++ b/libc/stdlib/malloc-simple/Makefile
@@ -23,20 +23,21 @@
TOPDIR=../../../
include $(TOPDIR)Rules.mak
-MSRC=alloc.c
-MOBJ=malloc.o realloc.o free.o calloc.o memalign.o
-OBJS=$(MOBJ)
+MSRC := alloc.c
+MOBJ := malloc.o realloc.o free.o calloc.o memalign.o
-OBJ_LIST=../../obj.stdlib.malloc-simple
+OBJS := $(MOBJ)
+
+OBJ_LIST := ../../obj.stdlib.malloc-simple
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, stdlib/malloc-simple/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, stdlib/malloc-simple/%, $^) > $@
$(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/stdlib/malloc-standard/Makefile b/libc/stdlib/malloc-standard/Makefile
index 331feae20..1e3d358bc 100644
--- a/libc/stdlib/malloc-standard/Makefile
+++ b/libc/stdlib/malloc-standard/Makefile
@@ -29,28 +29,26 @@ ifeq ($(UCLIBC_MALLOC_DEBUGGING),y)
CFLAGS += -D__MALLOC_DEBUGGING
endif
-# calloc.c can be found at uClibc/libc/stdlib/calloc.c
-# valloc.c can be found at uClibc/libc/stdlib/valloc.c
-CSRC=malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c
-
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-
-OBJS=$(COBJS)
-
ifeq ($(UCLIBC_HAS_THREADS),y)
CFLAGS += $(PTINC)
endif
-OBJ_LIST=../../obj.stdlib.malloc-standard
+# calloc.c can be found at uClibc/libc/stdlib/calloc.c
+# valloc.c can be found at uClibc/libc/stdlib/valloc.c
+CSRC := malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c
+
+OBJS := $(patsubst %.c,%.o, $(CSRC))
+
+OBJ_LIST := ../../obj.stdlib.malloc-standard
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, stdlib/malloc-standard/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, stdlib/malloc-standard/%, $^) > $@
-$(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/stdlib/malloc/Makefile b/libc/stdlib/malloc/Makefile
index e4a6f3a43..af67064fb 100644
--- a/libc/stdlib/malloc/Makefile
+++ b/libc/stdlib/malloc/Makefile
@@ -36,23 +36,22 @@ CFLAGS += -DMALLOC_MMB_DEBUGGING
endif
endif
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS)
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-OBJ_LIST=../../obj.stdlib.malloc
+OBJ_LIST := ../../obj.stdlib.malloc
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, stdlib/malloc/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, stdlib/malloc/%, $^) > $@
malloc.o free.o realloc.o memalign.o: malloc.h
-$(COBJS): heap.h
+$(OBJS): heap.h
# Depend on uClinux_config.h to cache changes in __UCLIBC_MALLOC_DEBUGGING__
-$(COBJS): %.o : %.c ../../../include/bits/uClibc_config.h
+$(OBJS): %.o : %.c ../../../include/bits/uClibc_config.h
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
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
diff --git a/libc/sysdeps/linux/alpha/Makefile b/libc/sysdeps/linux/alpha/Makefile
index cee893a3b..ed354d3dc 100644
--- a/libc/sysdeps/linux/alpha/Makefile
+++ b/libc/sysdeps/linux/alpha/Makefile
@@ -19,61 +19,50 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S brk.S bsd-_setjmp.S bsd-setjmp.S clone.S \
- setjmp.S divl.S reml.S remq.S divq.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S brk.S bsd-_setjmp.S bsd-setjmp.S clone.S \
+ setjmp.S divl.S reml.S remq.S divq.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=sysdep.c #brk.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := sysdep.c #brk.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/arm/Makefile b/libc/sysdeps/linux/arm/Makefile
index 19701e1d9..055dc08f0 100644
--- a/libc/sysdeps/linux/arm/Makefile
+++ b/libc/sysdeps/linux/arm/Makefile
@@ -19,66 +19,54 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
+SSRC := __longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
bsd-_setjmp.S sigrestorer.S mmap64.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c syscall.c ioperm.c iopl.c sigaction.c __syscall_error.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c syscall.c ioperm.c iopl.c sigaction.c __syscall_error.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/bfin/Makefile b/libc/sysdeps/linux/bfin/Makefile
index b43209106..85f3cb910 100644
--- a/libc/sysdeps/linux/bfin/Makefile
+++ b/libc/sysdeps/linux/bfin/Makefile
@@ -19,62 +19,35 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o
-#CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-CTOR_TARGETS=
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o
-SSRC= __longjmp.S setjmp.S bsd-_setjmp.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S setjmp.S bsd-_setjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c bsdsetjmp.c clone.c syscall.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c bsdsetjmp.c clone.c syscall.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
all: $(OBJ_LIST)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
- $(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
- $(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
-else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
-endif
headers:
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index 44014979d..e45c58961 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -19,39 +19,40 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-SRCS = $(wildcard *.c)
+SRCS = $(wildcard *.c)
-ifeq ($(strip $(EXCLUDE_BRK)),y)
+ifeq ($(EXCLUDE_BRK),y)
SRCS := $(filter-out sbrk.c,$(SRCS))
endif
SRCS := $(filter-out ssp-local.c,$(SRCS))
-ifneq ($(strip $(UCLIBC_HAS_SSP)),y)
+ifneq ($(UCLIBC_HAS_SSP),y)
SRCS := $(filter-out ssp.c,$(SRCS))
-NONSHARED_OBJ_LIST=
+NONSHARED_OBJ_LIST :=
else
-NONSHARED_OBJ_LIST=../../../nonshared_obj.sysdeps.common
+NONSHARED_OBJ_LIST := ../../../nonshared_obj.sysdeps.common
ssp.o: CFLAGS += $(SSP_DISABLE_FLAGS)
ssp-local.o: CFLAGS += $(SSP_DISABLE_FLAGS)
endif
-OBJS = $(patsubst %.c,%.o, $(SRCS))
+OBJS := $(patsubst %.c,%.o, $(SRCS))
-NONSHARED_OBJS = ssp-local.o
+NONSHARED_OBJS := ssp-local.o
-OBJ_LIST=../../../obj.sysdeps.common
+OBJ_LIST := ../../../obj.sysdeps.common
all: $(OBJ_LIST) $(NONSHARED_OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, sysdeps/linux/common/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, sysdeps/linux/common/%, $^) > $@
$(NONSHARED_OBJ_LIST): $(NONSHARED_OBJS)
- echo $(patsubst %, sysdeps/linux/common/%, $(NONSHARED_OBJS)) > $(NONSHARED_OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, sysdeps/linux/common/%, $^) > $@
$(OBJS) $(NONSHARED_OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
headers:
$(LN) -fs ../libc/sysdeps/linux/common/fpu_control.h $(TOPDIR)/include/
diff --git a/libc/sysdeps/linux/cris/Makefile b/libc/sysdeps/linux/cris/Makefile
index 9063ff7cf..3c60e01ca 100644
--- a/libc/sysdeps/linux/cris/Makefile
+++ b/libc/sysdeps/linux/cris/Makefile
@@ -19,63 +19,52 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.c
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.c
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC= setjmp.S __longjmp.S clone.S sysdep.S syscall.S
+SSRC = setjmp.S __longjmp.S clone.S sysdep.S syscall.S
ifeq ($(UNIFIED_SYSCALL),y)
- SSRC += __uClibc_syscall.S
+SSRC += __uClibc_syscall.S
endif
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC= __init_brk.c brk.c sbrk.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := __init_brk.c brk.c sbrk.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/e1/Makefile b/libc/sysdeps/linux/e1/Makefile
index e02888ac4..4e37d329f 100644
--- a/libc/sysdeps/linux/e1/Makefile
+++ b/libc/sysdeps/linux/e1/Makefile
@@ -24,61 +24,42 @@ UCLIBC_CTOR_DTOR=n
# If you're looking for vfork(), it is defined in include/unistd.h
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-CRT0=crt0.S
-CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+# why is crt1.c listed in CSRC ?
+CSRC := crt1.c syscalls.c longjmp.c setjmp.c vfork.c
+OBJS := $(patsubst %.c,%.o, $(CSRC))
-SSRC=
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-CSRC=crt1.c syscalls.c longjmp.c setjmp.c vfork.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-OBJS=$(SOBJS) $(MOBJ) $(COBJS) $(CRT0_OBJ)
-
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
-
-all: $(OBJ_LIST)
-
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/$(CRT0_OBJ)
-
-$(CRT0_OBJ): %.o : %.S
- $(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(SOBJS): %.o : %.S
+$(CRT_OBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS): %.o : %.c
+$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/frv/Makefile b/libc/sysdeps/linux/frv/Makefile
index bfb127af4..82d7ddf39 100644
--- a/libc/sysdeps/linux/frv/Makefile
+++ b/libc/sysdeps/linux/frv/Makefile
@@ -20,56 +20,51 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-SCRT0_OBJ = $(patsubst %,S%, $(CRT0_OBJ))
-CRT0_DEPS=gmon-start.S
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+SCRT_OBJ := $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS = crti.o crtn.o
+CTOR_TARGETS := crti.o crtn.o
-SSRC=__longjmp.S setjmp.S clone.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S setjmp.S clone.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=mmap.c sysdep.c syscall.c brk.c sbrk.c __init_brk.c dl-iterate-phdr.c
-CSRC+=xstatconv.c stat.c stat64.c fstat.c fstat64.c lstat.c lstat64.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC = mmap.c sysdep.c syscall.c brk.c sbrk.c __init_brk.c dl-iterate-phdr.c
+CSRC += xstatconv.c stat.c stat64.c fstat.c fstat64.c lstat.c lstat64.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
all: $(OBJ_LIST)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC) crtreloc.o
- $(CC) $(ASFLAGS) -DL_$* -r -nostdlib $< crtreloc.o -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+$(CRT_OBJ): $(CRT_SRC) crtreloc.o
+ $(CC) $(ASFLAGS) -DL_$* -r -nostdlib $^ -o $*.o
crtreloc.o: crtreloc.c
$(CC) $(CFLAGS) -c $< -o $@
-$(SCRT0_OBJ): $(CRT0_SRC) Scrtreloc.o
- $(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* -r -nostdlib $< Scrtreloc.o -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
+$(SCRT_OBJ): $(CRT_SRC) Scrtreloc.o
+ $(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* -r -nostdlib $^ -o $*.o
Scrtreloc.o: crtreloc.c
$(CC) $(CFLAGS) $(PIEFLAG) -c $< -o $@
$(CTOR_TARGETS): %.o : %.S
$(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
headers:
$(LN) -fs ../libc/sysdeps/linux/frv/link.h $(TOPDIR)/include/
diff --git a/libc/sysdeps/linux/h8300/Makefile b/libc/sysdeps/linux/h8300/Makefile
index 5403feb01..ceb2c145e 100644
--- a/libc/sysdeps/linux/h8300/Makefile
+++ b/libc/sysdeps/linux/h8300/Makefile
@@ -19,66 +19,56 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
ifeq ($(DOPIC),y)
+# is this not provided by gcc ?
ASFLAGS+=-D__PIC__
endif
#FIXME -- this arch should include its own crti.S and crtn.S
UCLIBC_CTOR_DTOR=n
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=ptrace.c brk.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := ptrace.c brk.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile
index e1795e0e5..ea61b8f3a 100644
--- a/libc/sysdeps/linux/i386/Makefile
+++ b/libc/sysdeps/linux/i386/Makefile
@@ -19,66 +19,54 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
+SSRC := __longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
bsd-_setjmp.S syscall.S mmap.S mmap64.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c sigaction.c __syscall_error.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c sigaction.c __syscall_error.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/i960/Makefile b/libc/sysdeps/linux/i960/Makefile
index b4997b9db..7e6311280 100644
--- a/libc/sysdeps/linux/i960/Makefile
+++ b/libc/sysdeps/linux/i960/Makefile
@@ -22,60 +22,43 @@ include $(TOPDIR)Rules.mak
#FIXME -- this arch should include its own crti.S and crtn.S
UCLIBC_CTOR_DTOR=n
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=clone.S _mmap.S setjmp.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := clone.S _mmap.S setjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+OBJS := $(SOBJ)
-OBJS=$(SOBJS) $(COBJS)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-all: $(OBJ_LIST)
-
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-$(COBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/m68k/Makefile b/libc/sysdeps/linux/m68k/Makefile
index 00ad88e6c..5173b2165 100644
--- a/libc/sysdeps/linux/m68k/Makefile
+++ b/libc/sysdeps/linux/m68k/Makefile
@@ -23,72 +23,60 @@ include $(TOPDIR)Rules.mak
ifeq ($(ARCH_HAS_MMU),y)
-CRT0_SRC = crt0.c
+CRT_SRC := crt0.c
else
-CRT0_SRC = crt0.S
+CRT_SRC := crt0.S
endif
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC= __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=ptrace.c brk.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := ptrace.c brk.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
ifeq ($(ARCH_HAS_MMU),y)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
else
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
endif
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
-
headers:
-ifneq ($(strip $(HAVE_ELF)),y)
+ifneq ($(HAVE_ELF),y)
echo "Working around compiler bug in the m68k-pic-coff toolchain"
$(LN) -fs ../libc/sysdeps/linux/m68k/float.h $(TOPDIR)/include/
endif
@@ -96,6 +84,6 @@ endif
clean:
$(RM) *.o *~ core
-ifneq ($(strip $(HAVE_ELF)),y)
+ifneq ($(HAVE_ELF),y)
$(RM) $(TOPDIR)/include/float.h
endif
diff --git a/libc/sysdeps/linux/microblaze/Makefile b/libc/sysdeps/linux/microblaze/Makefile
index 01b91ef71..0c4baa9dc 100644
--- a/libc/sysdeps/linux/microblaze/Makefile
+++ b/libc/sysdeps/linux/microblaze/Makefile
@@ -23,65 +23,54 @@ include $(TOPDIR)Rules.mak
#FIXME -- this arch should include its own crti.S and crtn.S
UCLIBC_CTOR_DTOR=n
-CFLAGS+=-I..
-ASFLAGS+=-I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
+CFLAGS += -I..
+ASFLAGS += -I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC = setjmp.S __longjmp.S vfork.S
-SOBJS = $(patsubst %.S,%.o, $(SSRC))
+SSRC := setjmp.S __longjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC = mmap.c syscall.c clone.c
-COBJS = $(patsubst %.c,%.o, $(CSRC))
+CSRC := mmap.c syscall.c clone.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS = $(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/mips/Makefile b/libc/sysdeps/linux/mips/Makefile
index 3fe6b54a1..a08bfa9f6 100644
--- a/libc/sysdeps/linux/mips/Makefile
+++ b/libc/sysdeps/linux/mips/Makefile
@@ -19,66 +19,54 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S syscall.S pipe.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S syscall.S pipe.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=__longjmp.c brk.c setjmp_aux.c mmap.c __syscall_error.c \
+CSRC := __longjmp.c brk.c setjmp_aux.c mmap.c __syscall_error.c \
cacheflush.c pread_write.c sysmips.c _test_and_set.c sigaction.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/nios/Makefile b/libc/sysdeps/linux/nios/Makefile
index b2b622329..b1c558fee 100644
--- a/libc/sysdeps/linux/nios/Makefile
+++ b/libc/sysdeps/linux/nios/Makefile
@@ -19,61 +19,35 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
-SSRC= __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC= brk.c crtbegin.c crtend.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c crtbegin.c crtend.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
all: $(OBJ_LIST)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
- $(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
- $(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
-else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
-endif
headers:
$(LN) -fs ../libc/sysdeps/linux/nios/fpu_control.h $(TOPDIR)/include/
diff --git a/libc/sysdeps/linux/nios2/Makefile b/libc/sysdeps/linux/nios2/Makefile
index 0292328f4..4202eb611 100644
--- a/libc/sysdeps/linux/nios2/Makefile
+++ b/libc/sysdeps/linux/nios2/Makefile
@@ -19,60 +19,49 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC= __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S vfork.S clone.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S vfork.S clone.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC= brk.c syscall.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c syscall.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/powerpc/Makefile b/libc/sysdeps/linux/powerpc/Makefile
index e0d5dcdd2..2a1f9cf89 100644
--- a/libc/sysdeps/linux/powerpc/Makefile
+++ b/libc/sysdeps/linux/powerpc/Makefile
@@ -19,67 +19,54 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
+SSRC := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
clone.S __uClibc_syscall.S syscall.S vfork.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=mmap.c __syscall_error.c pread_write.c ioctl.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := mmap.c __syscall_error.c pread_write.c ioctl.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/sh/Makefile b/libc/sysdeps/linux/sh/Makefile
index d986850ba..00ccb06af 100644
--- a/libc/sysdeps/linux/sh/Makefile
+++ b/libc/sysdeps/linux/sh/Makefile
@@ -20,65 +20,53 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=setjmp.S __longjmp.S vfork.S clone.S ___fpscr_values.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := setjmp.S __longjmp.S vfork.S clone.S ___fpscr_values.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=mmap.c longjmp.c pipe.c __init_brk.c brk.c sbrk.c syscall.c pread_write.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := mmap.c longjmp.c pipe.c __init_brk.c brk.c sbrk.c syscall.c pread_write.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/sh64/Makefile b/libc/sysdeps/linux/sh64/Makefile
index af49f5f1c..94486deee 100644
--- a/libc/sysdeps/linux/sh64/Makefile
+++ b/libc/sysdeps/linux/sh64/Makefile
@@ -21,64 +21,53 @@ TOPDIR=../../../../
include $(TOPDIR)Rules.mak
CFLAGS += -I..
-ASFLAGS+=-I.. -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
+ASFLAGS += -I.. -D__ASSEMBLER__ -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC = setjmp.S longjmp.S
-SOBJS = $(patsubst %.S,%.o, $(SSRC))
+SSRC := setjmp.S longjmp.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC = __init_brk.c brk.c sbrk.c syscall.c
-COBJS = $(patsubst %.c,%.o, $(CSRC))
+CSRC := __init_brk.c brk.c sbrk.c syscall.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS = $(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/sparc/Makefile b/libc/sysdeps/linux/sparc/Makefile
index de2fe0a4e..579140f08 100644
--- a/libc/sysdeps/linux/sparc/Makefile
+++ b/libc/sysdeps/linux/sparc/Makefile
@@ -19,61 +19,53 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S fork.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
+SSRC := __longjmp.S fork.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
urem.S udiv.S umul.S sdiv.S rem.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c __syscall_error.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c __syscall_error.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(MOBJ) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
crtn.o: crtn.S
$(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/v850/Makefile b/libc/sysdeps/linux/v850/Makefile
index d20bc89c6..2d54cc2e8 100644
--- a/libc/sysdeps/linux/v850/Makefile
+++ b/libc/sysdeps/linux/v850/Makefile
@@ -21,64 +21,53 @@ TOPDIR=../../../../
include $(TOPDIR)Rules.mak
CFLAGS += -I..
-ASFLAGS+=-I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
+ASFLAGS += -I.. -D__ASSEMBLER -DASM_GLOBAL_DIRECTIVE=.globl
TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
-CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt0.S
+CRT_OBJ := crt0.o crt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC = setjmp.S __longjmp.S vfork.S
-SOBJS = $(patsubst %.S,%.o, $(SSRC))
+SSRC := setjmp.S __longjmp.S vfork.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC = mmap.c syscall.c clone.c
-COBJS = $(patsubst %.c,%.o, $(CSRC))
+CSRC := mmap.c syscall.c clone.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS = $(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
- cp $(CRT0_OBJ) $(TOPDIR)lib/
+ cp $(CRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
-$(CRT0_OBJ): $(CRT0_SRC)
+$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/sysdeps/linux/x86_64/Makefile b/libc/sysdeps/linux/x86_64/Makefile
index c38204e4d..9bad495a9 100644
--- a/libc/sysdeps/linux/x86_64/Makefile
+++ b/libc/sysdeps/linux/x86_64/Makefile
@@ -19,65 +19,53 @@
TOPDIR=../../../../
include $(TOPDIR)Rules.mak
-CRT_SRC = crt1.S
-CRT_OBJ = crt1.o
-SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ))
-CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+CRT_SRC := crt1.S
+CRT_OBJ := crt1.o
+SCRT_OBJ := Scrt1.o
+CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
-SSRC=__longjmp.S vfork.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S clone.S
-SOBJS=$(patsubst %.S,%.o, $(SSRC))
+SSRC := __longjmp.S vfork.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S clone.S
+SOBJ := $(patsubst %.S,%.o, $(SSRC))
-CSRC=brk.c sigaction.c __syscall_error.c mmap.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
+CSRC := brk.c sigaction.c __syscall_error.c mmap.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-OBJS=$(SOBJS) $(COBJS)
+OBJS := $(SOBJ) $(COBJ)
-OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
+OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
-all: $(OBJ_LIST)
+all: $(OBJ_LIST) $(CTOR_TARGETS)
-$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ) $(CTOR_TARGETS)
- echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST)
+$(OBJ_LIST): $(OBJS) $(CRT_OBJ) $(SCRT_OBJ)
+ $(STRIPTOOL) -x -R .note -R .comment $^
$(INSTALL) -d $(TOPDIR)lib/
cp $(CRT_OBJ) $(SCRT_OBJ) $(TOPDIR)lib/
+ echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $@
$(CRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
$(SCRT_OBJ): $(CRT_SRC)
$(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(SOBJS): %.o : %.S
+$(SOBJ): %.o : %.S
$(CC) $(ASFLAGS) -c $< -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
-ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
-crti.o: crti.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crti.S -o crti.o
-
-$(TOPDIR)lib/crti.o: crti.o
+ifeq ($(UCLIBC_CTOR_DTOR),y)
+$(TOPDIR)lib/crti.o: crti.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crti.o $(TOPDIR)lib/
-
-crtn.o: crtn.S
- $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c crtn.S -o crtn.o
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
-$(TOPDIR)lib/crtn.o: crtn.o
+$(TOPDIR)lib/crtn.o: crtn.S
$(INSTALL) -d $(TOPDIR)lib/
- cp crtn.o $(TOPDIR)lib/
+ $(CC) $(ASFLAGS) $(SSP_DISABLE_FLAGS) -c $< -o $@
else
-$(TOPDIR)lib/crti.o:
- $(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
-$(TOPDIR)lib/crtn.o:
+$(CTOR_TARGETS):
$(INSTALL) -d $(TOPDIR)lib/
- $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+ $(AR) $(ARFLAGS) $@
endif
headers:
diff --git a/libc/termios/Makefile b/libc/termios/Makefile
index 4e43039eb..95210d7a9 100644
--- a/libc/termios/Makefile
+++ b/libc/termios/Makefile
@@ -24,30 +24,29 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-MSRC=termios.c
-MOBJ= tcdrain.o tcflow.o tcflush.o tcsendbreak.o tcsetpgrp.o tcgetpgrp.o \
+MSRC := termios.c
+MOBJ := tcdrain.o tcflow.o tcflush.o tcsendbreak.o tcsetpgrp.o tcgetpgrp.o \
isatty.o cfgetospeed.o cfgetispeed.o cfsetospeed.o cfsetispeed.o \
cfmakeraw.o cfsetspeed.o
+CSRC := tcgetattr.c tcgetsid.c tcsetattr.c ttyname.c
+COBJ := $(patsubst %.c,%.o, $(CSRC))
-CSRC=tcgetattr.c tcgetsid.c tcsetattr.c ttyname.c
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(MOBJ) $(COBJS)
+OBJS := $(MOBJ) $(COBJ)
-OBJ_LIST=../obj.termios
+OBJ_LIST := ../obj.termios
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, termios/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, termios/%, $^) > $@
$(MOBJ): $(MSRC)
$(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:
- $(RM) *.[oa] *~ core
+ $(RM) *.o *~ core
diff --git a/libc/unistd/Makefile b/libc/unistd/Makefile
index 6493615b2..7512e8362 100644
--- a/libc/unistd/Makefile
+++ b/libc/unistd/Makefile
@@ -18,57 +18,40 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-DIRS:=
-MSRC1 = exec.c
-MOBJ1 = execl.o execv.o execle.o execlp.o execvp.o
+MSRC := exec.c
+MOBJ = execl.o execv.o execle.o execlp.o execvp.o
-CSRC= sleep.c usleep.c ualarm.c getpass.c sysconf.c getlogin.c \
+CSRC = sleep.c usleep.c ualarm.c getpass.c sysconf.c getlogin.c \
fpathconf.c confstr.c pathconf.c swab.c usershell.c \
getsubopt.c daemon.c
-ifneq ($(strip $(ARCH_HAS_MMU)),y)
- MOBJ1 += __exec_alloc.o
+ifneq ($(ARCH_HAS_MMU),y)
+MOBJ += __exec_alloc.o
endif
-ifeq ($(strip $(UCLIBC_HAS_GNU_GETOPT)),y)
- CSRC += getopt.c
+ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
+CSRC += getopt.c
else
- CSRC += getopt-susv3.c
+CSRC += getopt-susv3.c
endif
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS) $(MOBJ1)
+COBJ := $(patsubst %.c,%.o, $(CSRC))
+OBJS := $(COBJ) $(MOBJ)
-OBJ_LIST=../obj.unistd
+OBJ_LIST := ../obj.unistd
all: $(OBJ_LIST)
$(OBJ_LIST): $(OBJS)
- echo $(patsubst %, unistd/%, $(OBJS)) > $(OBJ_LIST)
+ $(STRIPTOOL) -x -R .note -R .comment $^
+ echo $(patsubst %, unistd/%, $^) > $@
-$(MOBJ1): $(MSRC1)
+$(MOBJ): $(MSRC)
$(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
-
-$(OBJ): Makefile
-
-subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
-
-$(patsubst %, _dir_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dir_%, %, $@)
-
-$(patsubst %, _dirclean_%, $(DIRS)) : dummy
- $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
-
-.PHONY: dummy
-dummy:
clean:
- $(RM) *.[oa] *~ core
-
+ $(RM) *.o *~ core