6
#define concat(a,b) a##b
8
#define concat(a,b) a/**/b
11
#define Prog(name,objs,others) @@\
13
name.FILES=$(name.OBJS:.cmo=.ml) @@\
18
$(CAMLDEP) $(name.FILES) >> Makefile @@\
23
#define ProgOpt(name,objs,others) @@\
25
name.FILES=$(name.BINOBJS:.cmx=.ml) @@\
30
$(CAMLDEP) $(name.FILES) >> Makefile @@\
33
$(RM) name name.opt @@\
36
#define CamlProg(name,objs,others) @@\
37
Prog(name,objs,other) @@\
40
$(CAMLC) $(LINKFLAGS) others objs -o name @@\
43
#define CamlProgOpt(name,objs,others) @@\
44
ProgOpt(name,objs,other) @@\
47
$(CAMLCOPT) $(LINKFLAGSOPT) others objs -o name.opt @@\
48
$(CP) name.opt name @@\
50
#define CamlProgP4(name,objs,others) @@\
51
COMPFLAGS=-g -pp camlp4o @@\
53
Prog(name,objs,other) @@\
56
$(CAMLC) -pp camlp4o $(LINKFLAGS) others objs -o name @@\
58
#define CamlProgP4Opt(name,objs,others) @@\
59
COMPFLAGSOPT=-pp camlp4o @@\
61
ProgOpt(name,objs,other) @@\
64
$(CAMLCOPT) -pp camlp4o $(LINKFLAGSOPT) others objs -o name.opt @@\
65
$(CP) name.opt name @@\
67
#define CamlCustomProg(name,objs,others) @@\
68
Prog(name,objs,other) @@\
71
$(CAMLC) $(LINKFLAGS) -custom others objs -o name @@\
73
#define CamlCustomProgOpt(name,objs,others) @@\
74
CamlProgOpt(name,objs,others) @@\
76
#define CamlCustomProgP4(name,objs,others) @@\
77
COMPFLAGS=-g -pp camlp4o @@\
79
Prog(name,objs,other) @@\
82
$(CAMLC) -pp camlp4o $(LINKFLAGS) -custom others objs -o name @@\
84
#define CamlCustomProgP4Opt(name,objs,others) @@\
85
CamlProgP4Opt(name,objs,others)
87
#define CamlGraphProg(name,objs,others) @@\
88
CamlCustomProg(name,objs,unix.cma graphics.cma others) @@\
90
#define CamlGraphProgOpt(name,objs,others) @@\
91
CamlCustomProgOpt(name,objs,unix.cmxa graphics.cmxa others) @@\
93
#define CamlGraphProgP4(name,objs,others) @@\
94
CamlCustomProgP4(name,objs,unix.cma graphics.cma others) @@\
96
#define CamlGraphProgP4Opt(name,objs,others) @@\
97
CamlCustomProgP4Opt(name,objs,unix.cmxa graphics.cmxa others) @@\
99
#define CamlTkProg(name,objs,others) @@\
100
COMPFLAGS=-I +labltk @@\
101
LINKFLAGS=$(COMPFLAGS) @@\
102
CamlCustomProg(name,objs,labltk.cma others)
104
#define CamlTkProgOpt(name,objs,others) @@\
105
COMPFLAGSOPT=-I +labltk @@\
106
LINKFLAGSOPT=$(COMPFLAGSOPT) @@\
107
CamlCustomProgOpt(name,objs,labltk.cmxa others)
109
#define CamlLibrary(name,ojs,others) @@\
113
$(CAMLLIBR) others objs -o name @@\
119
#define CamlYaccFile(basename) @@\
120
basename.ml basename.mli: basename.mly @@\
121
@$(RM) basename.ml basename.mli @@\
122
$(CAMLYACC) basename.mly @@\
123
@chmod a-w basename.ml basename.mli @@\
126
$(RM) basename.ml basename.mli @@\
128
beforedepend:: basename.ml basename.mli @@\
131
#define CamlLexFile(basename) @@\
132
basename.ml: basename.mll @@\
133
@$(RM) basename.ml @@\
134
$(CAMLLEX) basename.mll @@\
135
@chmod a-w basename.ml @@\
138
$(RM) basename.ml @@\
140
beforedepend:: basename.ml @@\
143
#define CamlPreproFile(target) @@\
144
target: concat(target,p) @@\
146
@echo '(* GENERATED FILE --- DO NOT EDIT. *)' > target @@\
147
$(CPP) < concat(target,p) >> target @@\
148
@chmod a-w target @@\
153
beforedepend:: target @@\
156
#define SubDir(dir) @@\
158
@-echo "-- Making all in" dir; cd dir; make all @@\
163
@-echo "-- Making opt in" dir; cd dir; make opt @@\
166
@-echo "-- Making clean in" dir; cd dir; make clean @@\
169
@-echo "-- Making makefiles in" dir; cd dir; make TOP=../$(TOP) makefiles @@\
172
#define SubGraphDir(dir) @@\
174
@-echo "-- Making all in" dir; echo "(This program requires the libgraph library;"; echo " if you haven't installed it, compilation will fail.)"; cd dir; make all @@\
177
@-echo "-- Making opt in" dir; echo "(This program requires the libgraph library compiled to the native code;"; echo " if you haven't installed it, compilation will fail.)"; cd dir; make opt @@\
180
@-echo "-- Making clean in" dir; cd dir; make clean @@\
183
@-echo "-- Making makefiles in" dir; cd dir; make TOP=../$(TOP) makefiles @@\
186
#define SubTkDir(dir) @@\
188
@-echo "-- Making all in" dir; echo "(This program requires the CamlTk library;"; echo " if you haven't installed it, compilation will fail.)"; cd dir; make all @@\
191
@-echo "-- Making opt in" dir; echo "(This program requires the CamlTk library compiled to native code;"; echo " if you haven't installed it, compilation will fail.)"; cd dir; make opt @@\
194
@-echo "-- Making clean in" dir; cd dir; make clean @@\
197
@-echo "-- Making makefiles in" dir; cd dir; make TOP=../$(TOP) makefiles @@\