(file) Return to Makefile CVS log (file) (dir) Up to [venge] / src / mkc

 1 graydon 1.1 
 2             INC := -I $(shell camlp4o -where) -I .
 3             FE := camlp4o ./mlex.cmo ./fe.cmo
 4             
 5             TMPS := Makefile-test-out Makefile-test-out.c
 6             TMPS += Makefile-test-tmp Makefile-test-dump.ml Makefile-test.ml
 7             TMPS += clex.ml
 8             
 9             all: fe.cmo be.cmo
10             
11             clean:
12             	rm -f *.c *.cmo *.cmi $(TMPS) 
13             
14             test: Makefile-test-out
15             	./Makefile-test-out
16             
17             test-dump: Makefile-test-dump.ml
18             	cat $<
19             
20             test-dump-c: Makefile-test-out.c
21             	cat $<
22 graydon 1.1 
23 graydon 1.2 Makefile-test-dump.ml: Makefile-test mk.cmo fe.cmo mlex.cmo
24             	$(FE) pr_o.cmo -impl $< >$@
25             
26             Makefile-test.ml:
27 graydon 1.1 	ln -s Makefile-test Makefile-test.ml
28             
29 graydon 1.2 Makefile-test-tmp: mk.cmo be.cmo fe.cmo mlex.cmo Makefile-test.ml
30             	ocamlc -pp '$(FE)' -o $@ frontc.cma mk.cmo be.cmo -impl Makefile-test.ml
31 graydon 1.1 
32             Makefile-test-out.c: Makefile-test-tmp
33             	./$< >$@
34             
35             Makefile-test-out: Makefile-test-out.c
36             	gcc -o $@ $<
37             
38             be.cmo: be.ml clex.cmo cquot.cmo
39             	ocamlc -pp 'camlp4o ./clex.cmo ./cquot.cmo' -c $(INC) be.ml
40             
41             fe.cmo: fe.ml mk.cmo mlex.cmo
42             	ocamlc -pp 'camlp4o q_MLast.cmo pa_extend.cmo' -c $(INC) fe.ml
43             
44             # making cquot stuff
45             cquot.cmo: cquot.ml clex.cmo
46             	ocamlc -pp 'camlp4o q_MLast.cmo pa_extend.cmo' -c $(INC) cquot.ml
47             
48             clex.cmo: clex.ml
49             	ocamlc -c clex.ml
50             
51             # basic pattern rules
52 graydon 1.1 
53             %.ml: %.mll
54             	ocamllex $<
55             
56             %.cmo: %.ml
57             	ocamlc -c $(INC) $<

graydon hoare
Powered by
ViewCVS 0.9.2