Makefile 1.84 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16


xxx:
	rm toto.rif; lucky -l 2000 -pp lucky_cpp rabbit-speed.luc | grep outs | cut -d ' ' -f 2 | lucky rabbit-dir.luc > toto.rif

v:
	rm -f toto2.rif ;sed -e 's/#inputs \"Speed\":real/#inputs/' toto.rif > toto2.rif
	gnuplot-rif -x11 toto2.rif
	cat toto2.gp | cut -d ' ' -f 3-15 | grep -v End_of_file | grep -v Lucky | grep -v steps  > zz.gp
	gnuplot zz.plot


MAIN=rabbit

CMXA_LIB = unix.cmxa  str.cmxa bdd.cmxa polka.cmxa luc4ocaml.cmxa 
CMA_LIB=luc4ocaml.cma
17
LUC4OCAML_INSTALL_DIR = -I ../../$(HOSTTYPE)/lib
18
19
20
21
22
23
24
25
26
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
# LUC4OCAML_INSTALL_DIR = -I +lucky


$(MAIN).opt:$(MAIN).ml
	ocamlopt.opt $(LUC4OCAML_INSTALL_DIR) graphics.cmxa $(CMXA_LIB)  $(MAIN).ml -o $(MAIN).opt

$(MAIN):$(MAIN).ml
	ocamlopt.opt $(LUC4OCAML_INSTALL_DIR) graphics.cma $(CMA_LIB)  $(MAIN).ml -o $(MAIN)


demo: $(MAIN).opt
	time ./$(MAIN).opt  50000 0.001 line

demo2: $(MAIN).opt
	time ./$(MAIN).opt 10000 0.0 line

clean:
	rm -f *.top *.cmi *.cmo *.cmx *.o *.cma *.cmxa *.a *.cmi *.cmo *.cmi *.cmx *.o  *~ $(MAIN) $(MAIN).opt *~ *.pp_luc



%_lut.luc: crazy_rabbit.lut
	lutin -o $@ $< -main $*

lut: moving-obstacle3.lut
	lutin -o moving-obstacle3-lut.luc moving-obstacle3.lut -main moving_obstacle
	lutin -o rabbit-speed-lut.luc rabbit-speed.lut -main 

louis:
	lutin -o louis.luc crazy_rabbit.lut -main louis


test: $(MAIN)
	./$(MAIN).opt | grep -v "The random engine is initialized with the seed" > $(MAIN).out &&  \
	rm -f test.res && diff -u -i $(MAIN).out.exp $(MAIN).out \
	    > test.res
	[ ! -s test.res ] && make clean 

utest:
	cp $(MAIN).out $(MAIN).out.exp




# A FAIRE
#
# 1 - determiner les sommets de l'obstacle avec get_vertices pour pouvoir afficher le vrai obstacle
# 2 - Colorer l'obstacle en bleu pour pouvoir remettre les anciens points de
# la trajectoire
# 3 - Faire se ballader l'obstacle un peu plus aleatoirement
#