Makefile 1.47 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
# "opam install camlidl" does put dllcamlidl.so into stublibs
14
CAMLIDL=$(shell ocamlfind query camlidl)
15
16
17
18
STUBLIBS=$(shell dirname $(CAMLIDL))/stublibs

dllcamlidl.so:$(STUBLIBS)/dllcamlidl.so

19
$(STUBLIBS)/dllcamlidl.so:  $(CAMLIDL)/dllcamlidl.so 
20
	cp $< $@
21

22
23
24
25
fix_camlidl_meta: $(CAMLIDL)/META
	cat $(CAMLIDL)/META | sed s/archive\(byte\)/archive\(byte,plugin\)/ > $(CAMLIDL)/META-new
	mv  $(CAMLIDL)/META-new  $(CAMLIDL)/META

26

27
# Some more clutches because oasis does not support camlidl
28
polka/vector.ml: polka/vector.idl
29
30
	cd polka; make idl

erwan's avatar
erwan committed
31
lutin-utils/src/lutinUtils.ml: lutin-utils/src/lutinUtils.idl
32
	cd lutin-utils/src/; make 
33

34
###################################################
35
build:  setup.data $(CAMLIDL)/dllcamlidl.so 
36
	ocaml setup.ml -build 
37

erwan's avatar
erwan committed
38
setup.ml:_oasis lutin/src/version.ml polka/vector.ml lutin-utils/src/lutinUtils.ml
39
40
41
	oasis setup 


42
43
setup.data:configure
configure: setup.ml
44
	ocaml setup.ml  -configure
45
46
47
48
49

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

50
51
52
53
54
man:
	cd doc/lutin-man/ && make


install:
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
	ocaml setup.ml -install

uninstall:
	ocaml setup.ml -uninstall

reinstall:
	ocaml setup.ml -reinstall

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


.PHONY: test slink
test: slink cpcomp
70
	cd examples && make test
71

72
73

###################################################
74
75
# for developpers
include ./Makefile.dev