Makefile 1.51 KB
Newer Older
1
2
3
ifndef LURETTE_PATH
  LURETTE_PATH=$(PWD)
endif
4

5
6
all:build

7
include ./Makefile.version
8
-include mymakefile
9

10
11
###################################################
# camlidl clutches...
12

13
14
# "opam install camlidl" does not generate (nor install) dllcamlidl.so
CAMLIDL=$(shell ocamlfind query camlidl)
15

16
17
18
19
20
dllcamlidl.so:$(CAMLIDL)/dllcamlidl.so
$(CAMLIDL)/dllcamlidl.so: $(CAMLIDL)/libcamlidl.a
	ocamlmklib -o camlidl $<
	cp dllcamlidl.so $@
	rm dllcamlidl.so libcamlidl.a
21

22
# Some more clutches because oasis does not support camlidl
23
polka/vector.ml: polka/vector.idl
24
25
	cd polka; make idl

26
lutin-utils/src/lutinutils.ml: lutin-utils/src/lutinUtils.idl
27
	cd lutin-utils/src/; make 
28

29
30
31
32
33
34
35
36
###################################################
build:  setup.data $(CAMLIDL)/dllcamlidl.so
	ocaml setup.ml -build

setup.ml:_oasis lutin/src/version.ml polka/vector.ml lutin-utils/src/lutinutils.ml
	oasis setup 


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
setup.data:configure
configure: setup.ml
	ocaml setup.ml -configure \
		--prefix $(LURETTE_PATH) \
		--exec-prefix $(LURETTE_PATH)/$(HOSTTYPE) \
		--enable-tests

.PHONY:doc
doc:
	ocaml setup.ml -doc

install:
	ocaml setup.ml -install
	cp lutin/src/lut4c_stubs.h $(shell ocamlc -where)/../lutin/

uninstall:
	ocaml setup.ml -uninstall

reinstall:
	ocaml setup.ml -reinstall
	cp lutin/src/lut4c_stubs.h $(shell ocamlc -where)/../lutin/

distclean:
	ocaml setup.ml -distclean
	rm -rf _build/src


.PHONY: test slink
test: slink cpcomp
66
	cd examples && make test
67

68
69

###################################################
70
71
# for developpers
include ./Makefile.dev