summaryrefslogtreecommitdiff
path: root/libc/misc
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/misc
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/misc')
-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
26 files changed, 218 insertions, 272 deletions
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