# $Id: Makefile,v 1.6 2003/05/04 13:20:15 reddawg Exp $ # The System Makefile (C) 2002 The UbixOS Project #Compiler GCC = gcc G++ = gcc #Linker LD = ld -Bshareable AR = ar #Delete Program REMOVE = rm -f #Objects OBJS = #Sub Sections SUBS = ./stdio/*.o ./sys/*.o ./string/*.o ./stdlib/*.o ./math/*.o ./quad/*.o ./generic/*.o #Output OUTPUT = libc.so lib.so: $(OBJS) (cd stdio;make) (cd stdlib;make) (cd math;make) (cd quad;make) (cd sys;make) (cd string;make) (cd generic;make) # $(LD) -o $(OUTPUT) $(OBJS) ./stdio/*.o ./sys/*.o ./string/*.o ./stdlib/*.o $(GCC) -nostdlib -shared -Wl,-soname,libc.so -o $(OUTPUT) $(OBJS) $(SUBS) # Compile the source files .cc.o: $(G++) -Wall -nostdinc -O -I./include -c -o $@ $< .cc.s: $(G++) -Wall -nostdinc -O -I./include -S -o $@ $< .c.o: $(GCC) -Wall -nostdinc -O -I./include -c $< .c.s: $(GCC) -Wall -nostdinc -O -I./include -S -o $@ $< .S.o: $(GCC) -Wall -nostdinc -c -o $@ $< # Clean up the junk clean: $(REMOVE) $(OBJS) $(OUTPUT) (cd stdio;make clean) (cd sys;make clean) (cd stdlib;make clean) (cd generic;make clean) (cd string;make clean) (cd math;make clean) (cd quad;make clean)