diff --git a/src/lib/libc/Makefile b/src/lib/libc/Makefile new file mode 100644 index 0000000..876d115 --- /dev/null +++ b/src/lib/libc/Makefile @@ -0,0 +1,61 @@ +# $Id$ +# The System Makefile (C) 2002 The UbixOS Project + +# Include Global 'Source' Options +include ../../Makefile.inc +include ../Makefile.inc + +#Objects +OBJS = + +#Sub Sections +SUBS = ./*/*.o + +#Output +OUTPUT = libc.so + +lib.so: $(OBJS) + (cd yp;make) + (cd xdr;make) + (cd uuid;make) + (cd sys;make) + (cd string;make) + (cd stdtime;make) + (cd stdio;make) + (cd stdlib;make) + (cd locale;make) + (cd quad;make) + (cd gen;make) +# $(LD) $(LDFLAGS) -o $(OUTPUT) $(OBJS) ./stdio/*.o ./sys/*.o ./string/*.o ./stdlib/*.o + $(CC) -nostdlib -shared -Wl,-soname,libc.so -o $(OUTPUT) $(OBJS) $(SUBS) + +# Compile the source files +.cc.o: + $(CXX) -Wall -nostdinc -O -I./include -c -o $@ $< + +.cc.s: + $(CXX) -Wall -nostdinc -O -I./include -S -o $@ $< + +.c.o: + $(CC) -Wall -nostdinc -O -I./include -c $< + +.c.s: + $(CC) -Wall -nostdinc -O -I./include -S -o $@ $< + +.S.o: + $(CC) -Wall -nostdinc -c -o $@ $< + +# Clean up the junk +clean: + $(REMOVE) $(OBJS) $(OUTPUT) + (cd yp;make clean) + (cd xdr;make clean) + (cd uuid;make clean) + (cd sys;make clean) + (cd string;make clean) + (cd stdtime;make clean) + (cd stdio;make clean) + (cd stdlib;make clean) + (cd locale;make clean) + (cd quad;make clean) + (cd gen;make clean) diff --git a/src/lib/libc/Makefile.inc b/src/lib/libc/Makefile.inc new file mode 100644 index 0000000..d1c8f67 --- /dev/null +++ b/src/lib/libc/Makefile.inc @@ -0,0 +1 @@ +INCLUDES = -I../include -I../../include.new diff --git a/src/lib/libc/quad/Makefile b/src/lib/libc/quad/Makefile index 2d8e96b..37fb2bf 100644 --- a/src/lib/libc/quad/Makefile +++ b/src/lib/libc/quad/Makefile @@ -4,6 +4,7 @@ # Include Global 'Source' Options include ../../../Makefile.inc include ../../Makefile.inc +include ../Makefile.inc #Objects #OBJS = anddi3.o adddi3.o qdivrem.o umoddi3.o udivdi3.o divdi3.o @@ -15,16 +16,16 @@ # Compile the source files .cc.o: - $(CXX) $(CFLAGS) -Wall -nostdlib -O -I../../../include -c -o $@ $< + $(CXX) $(CFLAGS) -Wall -nostdlib -O $(INCLUDES) -c -o $@ $< .cc.s: - $(CXX) $(CFLAGS) -Wall -nostdlib -O -I../include -S -o $@ $< + $(CXX) $(CFLAGS) -Wall -nostdlib -O $(INCLUDES) -S -o $@ $< .c.o: - $(CC) $(CFLAGS) -Wall -nostdlib -O -I../../../include -c $< + $(CC) $(CFLAGS) -Wall -nostdlib -O $(INCLUDES) -c $< .c.s: - $(CC) $(CFLAGS) -Wall -nostdlib -O -I../include -S -o $@ $< + $(CC) $(CFLAGS) -Wall -nostdlib -O $(INCLUDES) -S -o $@ $< .S.o: $(CC) $(CFLAGS) -Wall -nostdlib -c -o $@ $< diff --git a/src/lib/libc/stdio/Makefile b/src/lib/libc/stdio/Makefile index 5ab16aa..f3a9993 100644 --- a/src/lib/libc/stdio/Makefile +++ b/src/lib/libc/stdio/Makefile @@ -6,7 +6,7 @@ include ../../Makefile.inc include ../Makefile.inc -INCLUDES += -I../locale/ +INCLUDES += -I../locale/ -I../../../contrib/gdtoa/ -I../i386 #Objects OBJS = _flock_stub.o asprintf.o clrerr.o fclose.o fdopen.o feof.o ferror.o fflush.o fgetc.o fgetln.o fgetpos.o fgets.o fgetwc.o fgetwln.o fgetws.o fileno.o findfp.o flags.o fopen.o fprintf.o fpurge.o fputc.o fputs.o fputwc.o fputws.o fread.o freopen.o fscanf.o fseek.o fsetpos.o ftell.o funopen.o fvwrite.o fwalk.o fwide.o fwprintf.o fwrite.o fwscanf.o getc.o getchar.o gets.o getw.o getwc.o getwchar.o makebuf.o mktemp.o perror.o printf.o putc.o putchar.o puts.o putw.o putwc.o putwchar.o refill.o remove.o rewind.o rget.o scanf.o setbuf.o setbuffer.o setvbuf.o snprintf.o sprintf.o sscanf.o stdio.o swprintf.o swscanf.o tempnam.o tmpfile.o tmpnam.o ungetc.o ungetwc.o unlocked.o vasprintf.o vfprintf.o vfscanf.o vfwprintf.o vfwscanf.o vprintf.o vscanf.o vsnprintf.o vsprintf.o vsscanf.o vswprintf.o vswscanf.o vwprintf.o vwscanf.o wbuf.o wprintf.o wscanf.o wsetup.o xprintf.o xprintf_errno.o xprintf_float.o xprintf_hexdump.o xprintf_int.o xprintf_quote.o xprintf_str.o xprintf_time.o xprintf_vis.o