summaryrefslogtreecommitdiff
path: root/libc/stdio
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/stdio
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/stdio')
-rw-r--r--libc/stdio/Makefile31
1 files changed, 12 insertions, 19 deletions
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