Makefile 1.38 KB
Newer Older
1
2
3
4
5

MAIN=rabbit

CMXA_LIB = unix.cmxa  str.cmxa bdd.cmxa polka.cmxa luc4ocaml.cmxa 
CMA_LIB=luc4ocaml.cma
6
LUC4OCAML_INSTALL_DIR = -I ../../../$(HOSTTYPE)/lib
7
8
9
# LUC4OCAML_INSTALL_DIR = -I +lucky


10
11
12
13
14
15
16
17
18
19
20
21
ifeq ($(HOSTTYPE),win32)
	LD_ARCH=-DWIN32
endif
ifeq ($(HOSTTYPE),cygwin)
	LD_ARCH=-DWIN32
endif
ifeq ($(HOSTTYPE),mac)
	LD_ARCH=-DMAC
endif



22
$(MAIN).opt:$(MAIN).ml
23
	ocamlopt.opt -cc g++ -cclib -lgmp $(LUC4OCAML_INSTALL_DIR) graphics.cmxa $(CMXA_LIB)  $(MAIN).ml -o $(MAIN).opt
24
25

$(MAIN):$(MAIN).ml
26
27
	ocamlc.opt $(LUC4OCAML_INSTALL_DIR) graphics.cma $(CMA_LIB)  $(MAIN).ml -o $(MAIN)

28
29
30
31
32
33
34
35
36
37
38
39
40


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



41
42
43
test: clean $(MAIN).opt 
	./$(MAIN).opt 1000 0.0 test | grep -v "The random engine is initialized with the seed"
	rm -f test.res && diff -u -i $(MAIN).out.exp $(MAIN).out > test.res && \
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
	[ ! -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
#