Makefile 2.9 KB
Newer Older
1

2
3
all:build

4
include ./Makefile.version
5
-include mymakefile
6

7
8
9
10
11
slink:
	rm -f bin lib include
	ln -s $(HOSTTYPE)/bin
	ln -s $(HOSTTYPE)/lib
	ln -s $(HOSTTYPE)/include
12

13
# to run after a 'git clone', or a change in the ocaml version, or to compile on another arch
14

15
16
build:  setup.data
	ocaml setup.ml -build
17

18
setup.ml:_oasis lutin/src/version.ml polka/vector.ml lutin-utils/src/lutinutils.ml
19
20
21
	oasis setup 

# a clutch because oasis does not support camlidl
22
polka/vector.ml: polka/vector.idl
23
24
	cd polka; make idl

25
lutin-utils/src/lutinutils.ml: lutin-utils/src/lutinUtils.idl
26
	cd lutin-utils/src/; make 
27
28
29
30
31
32
33
34
35
36
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
66
67
68
69
70
71
72
73

setup.data:configure
configure: setup.ml
	ocaml setup.ml -configure \
		--prefix $(LURETTE_PATH) \
		--exec-prefix $(LURETTE_PATH)/$(HOSTTYPE) \
		--enable-tests


utest: build  
	 ./ounitTestRun.native -output-html-dir test/html  -output-junit-file test/result-junit.xml


.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/


AR=ar
XXX= -I +ezdl -cclib -lezdl ezdl.cmxa
# essayons a la main
xxx:
	cd _build/lutin/src;	\
      ocamlopt -output-obj  \
      -I +rdbg-plugin   \
      str.cmxa unix.cmxa nums.cmxa rdbg-plugin.cmxa  \
      ../../polka/polka.cmxa ../../gbddml/gbddml.cmxa \
		$(XXX) \
		-o lut4c_lib.o \
		version.cmx lutVersion.cmx lexeme.cmx utils.cmx util.cmx sol_nb.cmx type.cmx prevar.cmx value.cmx var.cmx exp.cmx ne.cmx constraint.cmx   gne.cmx thickness.cmx poly_draw.cmx polyhedron.cmx formula_to_bdd.cmx store.cmx draw.cmx bddd.cmx fair_bddd.cmx solver.cmx prog.cmx fGen.cmx lucFGen.cmx lucky.cmx rif.cmx  reactive.cmx exprUtil.cmx expEval.cmx verbose.cmx lutErrors.cmx lutParser.cmx lutLexer.cmx syntaxe.cmx parsers.cmx syntaxeDump.cmx ckTypeEff.cmx ckIdentInfo.cmx checkEnv.cmx lutPredef.cmx checkType.cmx coIdent.cmx coAlgExp.cmx coTraceExp.cmx glue.cmx guard.cmx expand.cmx loopWeights.cmx  autoGen.cmx auto2Lucky.cmx   lutProg.cmx  luc2alice.cmx luc2c.cmx mainArg.cmx lutExe.cmx lut4c.cmx ;
	[ -d tmp_dir ] || mkdir tmp_dir && \
	cd tmp_dir && rm -f * && \
	$(AR) rcs  liblut4c.a   ../lut4c_lib.o  ../lut4c_stubs.o && \
	$(AR) x $(shell ocamlc -where)/libasmrun.a  &&\
	$(AR) q liblut4c.a *.o  && rm *.o  &&\
	cp  liblut4c.a .. 
74

75
76
77
78
79
80
81
82
83
84




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


BIN_INSTALL_DIR=$(HOSTTYPE)/bin
85
cpcomp:
86
87
88
89
90
	cp `which lus2lic$(EXE)`  $(BIN_INSTALL_DIR) || true 
	cp `which lus2ec`  $(BIN_INSTALL_DIR) || true 
	cp `which ecexe$(EXE)`  $(BIN_INSTALL_DIR) || true 
	cp `which ec2c$(EXE)`  $(BIN_INSTALL_DIR) || true 
	cp `which simec$(EXE)`  $(BIN_INSTALL_DIR) || true 
91
92


93
94
.PHONY: test slink
test: slink cpcomp
95
	cd examples && make test
96

97
98
99
100
101
102

pull-pascal:
	git pull ~raymond/git/lurette

pull-erwan:
	git pull ~jahier/lurette
103
104
105
106

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