diff --git a/src/lib/libstdc++/Makefile b/src/lib/libstdc++/Makefile new file mode 100644 index 0000000..70fdf6c --- /dev/null +++ b/src/lib/libstdc++/Makefile @@ -0,0 +1,42 @@ +# $Id$ +# The System Makefile (C) 2002 The UbixOS Project + +# Include Global 'Source' Options +include ../../Makefile.inc +include ../Makefile.inc + +#Objects +OBJS = sinst.o + +#Sub Sections +SUBS = + +#Output +OUTPUT = libstdc++.so + +#Includes +INCLUDES = -I./include -I. -I../libio -I../../include + +lib.so: $(OBJS) +# $(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 $(INCLUDES) -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) diff --git a/src/lib/libstdc++/sinst.cc b/src/lib/libstdc++/sinst.cc new file mode 100644 index 0000000..385e0e7 --- /dev/null +++ b/src/lib/libstdc++/sinst.cc @@ -0,0 +1,11 @@ +#include + +typedef char c; + +template class string_char_traits ; + +ostream& endl(ostream& outs) +{ +// return flush(outs.put('\n')); + return('\n'); +} diff --git a/src/lib/libstdc++/std/straights.h b/src/lib/libstdc++/std/straights.h new file mode 100644 index 0000000..e4dbaaa --- /dev/null +++ b/src/lib/libstdc++/std/straights.h @@ -0,0 +1,11 @@ +typedef char charT; + +extern "C++" { + +template struct string_char_traits { + typedef charT char_type; + static char_type eos () { return char_type(); } // the null character + static void assign (char_type& c1, const char_type& c2) { c1 = c2; } + }; + +}