GSS: add isFrontier(), make next private
[sbp.git] / Makefile
index 2a1e2f2..43d6717 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -175,11 +175,14 @@ bin/Header_%.o: edu.berkeley.sbp.jar .jvm-bridge
        cd bin; $(bin)/MakeHeaderModule -module Header_$* -jar ../edu.berkeley.sbp.jar
        cd bin; $(ghc) -c Header_$*.hs $(link)
 
-bin/Class_%.o: bin/Header_%.o
+bin/Class_%.o:
+       make bin/Header_$*.o
        cd bin; $(bin)/MakeClassModule -import Header_Java -import Header_$* -cp ../edu.berkeley.sbp.jar `echo $* | sed s/_/./g`
        cd bin; $(ghc) -c Class_$*.hs $(link)
 
-bin/JVM_%.o: bin/Class_%.o
+bin/JVM_%.o:
+       make bin/Class_$*.o
+       make bin/Header_$*.o
        cd bin; echo -e $($*_list) | $(bin)/MakeJVMModule JVM_$*
        cd bin; $(ghc) -c JVM_$*.hs $(link)
 
@@ -195,3 +198,15 @@ bin/HaskellDemo: src/SBP.hs \
        cd bin; $(ghc) -i../src/ -c ../src/HaskellDemo.hs $(link) -o HaskellDemo.o
        cd bin; for A in *.hs; do $(ghc) -c $$A $(link); done
        cd bin; $(ghc) $(linkopts) $(link) -o HaskellDemo *.o
+
+
+ghcroot = /usr/local/brian/ghc
+ghc = $(ghcroot)/compiler/ghc-inplace
+ghclibs = $(ghcroot)/rts/HSrts.jar:$(ghcroot)/libraries/base/HSbase.jar:$(ghcroot)/libraries/stm/HSstm.jar
+
+bin/Main.class: src/Main.lhs src/SBP.lhs
+       cd src; $(ghc) -fglasgow-exts -cpp -odir ../bin -c -java SBP.lhs
+       cd src; $(ghc) -fglasgow-exts -cpp -odir ../bin -java Main.lhs
+
+go: bin/Main.class edu.berkeley.sbp.jar
+       java -cp bin:$(ghclibs):edu.berkeley.sbp.jar Main
\ No newline at end of file