adamc@102: all: smlnj mlton c adamc@0: adamc@102: .PHONY: all smlnj mlton c clean adamc@0: adamc@244: smlnj: src/urweb.cm adamc@244: mlton: bin/urweb adamc@244: c: clib/urweb.o clib/driver.o adamc@0: adamc@0: clean: adamc@0: rm -f src/*.mlton.grm.* src/*.mlton.lex.* \ adamc@244: src/urweb.cm src/urweb.mlb \ adamc@102: clib/*.o adamc@0: rm -rf .cm src/.cm adamc@0: adamc@244: clib/urweb.o: src/c/urweb.c adamc@244: gcc -O3 -I include -c src/c/urweb.c -o clib/urweb.o adamc@102: adamc@102: clib/driver.o: src/c/driver.c adamc@117: gcc -O3 -I include -c src/c/driver.c -o clib/driver.o adamc@102: adamc@244: src/urweb.cm: src/prefix.cm src/sources adamc@0: cat src/prefix.cm src/sources \ adamc@244: >src/urweb.cm adamc@0: adamc@244: src/urweb.mlb: src/prefix.mlb src/sources src/suffix.mlb adamc@0: cat src/prefix.mlb src/sources src/suffix.mlb \ adamc@0: | sed 's/^\(.*\).grm$$/\1.mlton.grm.sig\n\1.mlton.grm.sml/' \ adamc@0: | sed 's/^\(.*\).lex$$/\1.mlton.lex.sml/' \ adamc@244: >src/urweb.mlb adamc@0: adamc@0: %.mlton.lex: %.lex adamc@0: cp $< $@ adamc@0: %.mlton.grm: %.grm adamc@0: cp $< $@ adamc@0: adamc@0: %.mlton.lex.sml: %.mlton.lex adamc@0: mllex $< adamc@0: adamc@0: %.mlton.grm.sig %.mlton.grm.sml: %.mlton.grm adamc@0: mlyacc $< adamc@0: adamc@0: MLTON := mlton adamc@0: adamc@0: ifdef DEBUG adamc@0: MLTON += -const 'Exn.keepHistory true' adamc@0: endif adamc@0: adamc@244: bin/urweb: src/urweb.mlb src/*.sig src/*.sml \ adamc@244: src/urweb.mlton.lex.sml \ adamc@244: src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml adamc@244: $(MLTON) -output $@ src/urweb.mlb