diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2001-01-30 11:36:12 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2001-01-30 11:36:12 +0000 |
commit | 35ec5000a5d5319a3f64931561e20ba20ebe7f65 (patch) | |
tree | ed69e30cf43474fa32f5140f078fbdc446512c7a /libc/stdio/Makefile | |
parent | 10ac6292af2deba97a16aac668d59dd996521a9c (diff) |
Fix a couple of bugs in printf. Add floating pt output for doubles. Yeah!
Modified stdio/Makefile to build printf.c according to Config values for
HAS_FLOATS and HAS_LONG_LONG.
Diffstat (limited to 'libc/stdio/Makefile')
-rw-r--r-- | libc/stdio/Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libc/stdio/Makefile b/libc/stdio/Makefile index 3801fce2c..2ad7cd737 100644 --- a/libc/stdio/Makefile +++ b/libc/stdio/Makefile @@ -24,6 +24,15 @@ TOPDIR=../ include $(TOPDIR)Rules.mak LIBC=$(TOPDIR)libc.a +PRINTF_FLAGS = + +ifeq ($(HAS_FLOATS),true) + PRINTF_FLAGS += -DWANT_DOUBLE +endif + +ifeq ($(HAS_LONG_LONG),true) + PRINTF_FLAGS += -DWANT_LONG_LONG +endif MSRC=stdio.c MOBJ=_stdio_init.o fputc.o fgetc.o fflush.o fgets.o gets.o fputs.o \ @@ -32,7 +41,7 @@ MOBJ=_stdio_init.o fputc.o fgetc.o fflush.o fgets.o gets.o fputs.o \ MSRC2=printf.c MOBJ2=printf.o sprintf.o fprintf.o vprintf.o vsprintf.o vfprintf.o snprintf.o \ - vsnprintf.o asprintf.o vfnprintf.o + vsnprintf.o asprintf.o vfnprintf.o fnprintf.o MSRC3=scanf.c MOBJ3=scanf.o sscanf.o fscanf.o vscanf.o vsscanf.o vfscanf.o @@ -54,7 +63,7 @@ $(MOBJ): $(MSRC) $(STRIPTOOL) -x -R .note -R .comment $*.o $(MOBJ2): $(MSRC2) - $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o + $(CC) $(CFLAGS) $(PRINTF_FLAGS) -DL_$* $< -c -o $*.o $(STRIPTOOL) -x -R .note -R .comment $*.o $(MOBJ3): $(MSRC3) |