]> gitweb.factorcode.org Git - factor.git/commitdiff
a proper makefile
authorSlava Pestov <slava@factorcode.org>
Mon, 16 Aug 2004 03:31:07 +0000 (03:31 +0000)
committerSlava Pestov <slava@factorcode.org>
Mon, 16 Aug 2004 03:31:07 +0000 (03:31 +0000)
Makefile [new file with mode: 0644]
build.sh [deleted file]
library/platform/native/stream.factor

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..45c2860
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+CC = gcc34
+CFLAGS = -Os -march=pentium4 -Wall -Wno-long-long
+LIBS = -lm
+STRIP = strip
+
+OBJS = native/arithmetic.o native/array.o native/bignum.o \
+       native/complex.o native/cons.o native/error.o \
+       native/factor.o native/fd.o native/file.o \
+       native/fixnum.o native/float.o native/gc.o \
+       native/image.o native/iomux.o native/memory.o \
+       native/misc.o native/port.o native/primitives.o \
+       native/ratio.o native/relocate.o native/run.o \
+       native/sbuf.o native/socket.o native/stack.o \
+       native/string.o native/types.o native/vector.o \
+       native/word.o
+
+f: $(OBJS)
+       $(CC) $(LIBS) -o $@ $(OBJS)
+       $(STRIP) $@
+
+clean:
+       rm -f $(OBJS)
+
+.c.o:
+       $(CC) -c $(CFLAGS) -o $@ $<
+
diff --git a/build.sh b/build.sh
deleted file mode 100644 (file)
index c81edfb..0000000
--- a/build.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-export CC=gcc
-export CFLAGS="-lm -g -Wall -Wno-long-long -Wno-inline"
-
-$CC $CFLAGS -o f native/*.c
index fa03563116663d0601dfadaaecbe29f0040a480f..e8173d8b111c54593c31b2fe498cc30a168ed5a1 100644 (file)
@@ -55,8 +55,8 @@ USE: namespaces
         
         ( -- )
         [
-            "in" get [ close-fd ] when*
             "out" get [ dup flush-fd close-fd ] when*
+            "in" get [ close-fd ] when*
         ] "fclose" set
     ] extend ;