annotate Makefile @ 106:d101cb1efe55

More with attributes and efficient serialization
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 15:49:14 -0400
parents 8921f0344193
children 94856a3b4752
rev   line source
adamc@102 1 all: smlnj mlton c
adamc@0 2
adamc@102 3 .PHONY: all smlnj mlton c clean
adamc@0 4
adamc@0 5 smlnj: src/lacweb.cm
adamc@0 6 mlton: bin/lacweb
adamc@102 7 c: clib/lacweb.o clib/driver.o
adamc@0 8
adamc@0 9 clean:
adamc@0 10 rm -f src/*.mlton.grm.* src/*.mlton.lex.* \
adamc@102 11 src/lacweb.cm src/lacweb.mlb \
adamc@102 12 clib/*.o
adamc@0 13 rm -rf .cm src/.cm
adamc@0 14
adamc@102 15 clib/lacweb.o: src/c/lacweb.c
adamc@103 16 gcc -O3 -I include -c src/c/lacweb.c -o clib/lacweb.o
adamc@102 17
adamc@102 18 clib/driver.o: src/c/driver.c
adamc@103 19 gcc -O3 -c src/c/driver.c -o clib/driver.o
adamc@102 20
adamc@0 21 src/lacweb.cm: src/prefix.cm src/sources
adamc@0 22 cat src/prefix.cm src/sources \
adamc@0 23 >src/lacweb.cm
adamc@0 24
adamc@0 25 src/lacweb.mlb: src/prefix.mlb src/sources src/suffix.mlb
adamc@0 26 cat src/prefix.mlb src/sources src/suffix.mlb \
adamc@0 27 | sed 's/^\(.*\).grm$$/\1.mlton.grm.sig\n\1.mlton.grm.sml/' \
adamc@0 28 | sed 's/^\(.*\).lex$$/\1.mlton.lex.sml/' \
adamc@0 29 >src/lacweb.mlb
adamc@0 30
adamc@0 31 %.mlton.lex: %.lex
adamc@0 32 cp $< $@
adamc@0 33 %.mlton.grm: %.grm
adamc@0 34 cp $< $@
adamc@0 35
adamc@0 36 %.mlton.lex.sml: %.mlton.lex
adamc@0 37 mllex $<
adamc@0 38
adamc@0 39 %.mlton.grm.sig %.mlton.grm.sml: %.mlton.grm
adamc@0 40 mlyacc $<
adamc@0 41
adamc@0 42 MLTON := mlton
adamc@0 43
adamc@0 44 ifdef DEBUG
adamc@0 45 MLTON += -const 'Exn.keepHistory true'
adamc@0 46 endif
adamc@0 47
adamc@1 48 bin/lacweb: src/lacweb.mlb src/*.sig src/*.sml \
adamc@1 49 src/lacweb.mlton.lex.sml \
adamc@1 50 src/lacweb.mlton.grm.sig src/lacweb.mlton.grm.sml
adamc@0 51 $(MLTON) -output $@ src/lacweb.mlb