-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.rule
79 lines (60 loc) · 1.95 KB
/
Makefile.rule
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
69
70
71
72
73
74
75
76
77
78
79
##############################################################
################ This part should be generic
################ Nothing to set up or fix here
##############################################################
distclean: clean
clean:
rm -f *.cm[iox] *.annot *.o *~ .*~ #*# *.cma *.a *.vcg
rm -f *.cma *.a *.cmxa
rm -f $(extra_CLEANUP)
depend:
$(OCAMLDEP) *.mli *.ml > .depend
.SUFFIXES:
.SUFFIXES: .mlp4 .ml .mli .cmo .cmi .cmx .mll .mly .cmd .y .l .c .o .so\
.fig .mp .mmp .eps .pdf .m4
.m4.ml:
m4 -P $< > $@
$(B)%.o: %.c
$(OCAMLOPT) -c -ccopt "-fPIC $(CFLAGS) -I $(INCLUDE) $(C_MACRO)" -o $@ $<
$(B)%.so: %.c
$(CC) -fPIC -shared -o $@ $<
$(B)%.c: %.y
$(YACC) $(YACC_FLAGS) -o $@ $<
$(B)%.c: %.l
$(LEX) $(LEX_FLAGS) -t $< > $@
$(B)%.cmo: %.ml
$(OCAMLC) $(OCAML_PACKAGES) $(CAMLC_CMI_PATH) $(OCAMLCFLAGS) -o $@ -c $<
$(B)%.cmi: %.mli
$(OCAMLC) $(OCAML_PACKAGES) $(CAMLC_CMI_PATH) $(OCAMLCFLAGS) -o $@ -c $<
$(B)%.cmx: %.ml
$(OCAMLOPT) $(OCAML_PACKAGES) $(OCAMLOPTFLAGS) $(CAMLC_CMI_PATH) -o $@ -c $<
$(B)%.cmo: %.mll
cp $< $(B)
$(OCAMLLEX) $(B)$<
$(OCAMLC) $(OCAML_PACKAGES) $(OCAMLCFLAGS) $(CAMLC_CMI_PATH) -o $@ -c $(B)$*.ml
$(B)%.cmx: %.mll
cp $< $(B)
$(OCAMLLEX) $(B)$<
$(OCAMLOPT) $(OCAML_PACKAGES) $(OCAMLOPTFLAGS) $(CAMLC_CMI_PATH) -o $@ -c $(B)$*.ml
$(B)%.cmo: %.mly
cp $< $(B)
$(OCAMLYACC) $(B)$<
$(OCAMLC) $(OCAML_PACKAGES) $(OCAMLCFLAGS) $(CAMLC_CMI_PATH) -o $@ -c $(B)$*.mli
$(OCAMLC) $(OCAML_PACKAGES) $(OCAMLCFLAGS) $(CAMLC_CMI_PATH) -o $@ -c $(B)$*.ml
$(B)%.cmx: %.mly
cp $< $(B)
$(OCAMLYACC) $(B)$<
$(OCAMLOPT) $(OCAML_PACKAGES) $(OCAMLOPTFLAGS) $(CAMLC_CMI_PATH) -o $@ -c $(B)$*.mli
$(OCAMLOPT) $(OCAML_PACKAGES) $(OCAMLOPTFLAGS) $(CAMLC_CMI_PATH) -o $@ -c $(B)$*.ml
$(B)%.cmi: %.mly
cp $< $(B)
$(OCAMLYACC) $(B)$<
$(OCAMLC) $(OCAML_PACKAGES) $(OCAMLCFLAGS) $(CAMLC_CMI_PATH) -o $@ -c $(B)$*.mli
.fig.mp:
fig2dev -L mp $< $@
.fig.mmp:
fig2dev -L mmp $< $@
.fig.eps:
fig2dev -L eps $< $@
.eps.pdf:
epstopdf $<