Makefile 780 Bytes
Newer Older
1
2
# Do "make install_cdml" before running this test

3
4
STATIC=
CAML=ocamlc
5

6
7
8
CDUCE=../../cduce
CDO2ML=../../cdo2ml

9
10
run:
	ocamlc -c a.mli
11
12
13
14
	$(CDUCE) --compile c.cd
	$(CDUCE) --compile a.cd
	$(CDO2ML) $(STATIC) c.cdo > c.ml
	$(CDO2ML) $(STATIC) a.cdo > a.ml
15
	ocamlfind $(CAML) -package cduce -linkpkg -o a c.ml a.ml b.ml
16
ifeq ($(STATIC),-static)
17
	rm *.cdo
18
endif
19
20
	./a

21
22
23
24
25
26
.PHONY: cdsdl
cdsdl:
	$(CDUCE) --compile cdsdl.cd -I `ocamlfind query ocamlsdl`
	ocamlfind ocamlc -o cdsdl -pp "$(CDO2ML) -static" -impl cdsdl.cdo -package cduce,ocamlsdl -linkpkg
	./cdsdl

27
28
29
30
31
32
33
.PHONY: cdmysql
cdmysql:
	$(CDUCE) --compile $@.cd -I `ocamlfind query mysql`
	ocamlfind ocamlc -o $@ -pp "$(CDO2ML) -static" -impl $@.cdo -package cduce,mysql -linkpkg
	./$@


34
clean:
35
	rm -f *.cmo *.cmx *.o *.cdo *.cmi a.ml *~ a