OBJS = const.cmo get_config.cmo db_types.cmo \ db_pg.cmo db_my.cmo \ db.cmo db_ac.cmo db_xml.cmo \ definitions.cmo registry.cmo session.cmo startpage.cmo \ filemenu.cmo taskmenu.cmo \ timetravel.cmo editor.cmo selectuser.cmo export.cmo \ admin.cmo admin_password.cmo admin_accounts.cmo admin_access.cmo \ init.cmo cmdline.cmo XOBJS = $(OBJS:.cmo=.cmx) # "" or ".bin" FORCE_BIN = wtimer.cgi: wtimer.cgi.$(TARGET) wtimer.ui$(FORCE_BIN) mv wtimer.cgi.$(TARGET) wtimer.cgi wtimer.cgi.byte: wtimer.cma main_cgi.cmo ocamlfind ocamlc -o wtimer.cgi.byte -package "$(REQUIRES)" \ $(I_OPTIONS) $(BYTELINK_OPTIONS) \ -linkpkg -predicates netstring_minimum wtimer.cma main_cgi.cmo wtimer.cgi.opt: wtimer.cmxa main_cgi.cmx ocamlfind ocamlopt -o wtimer.cgi.opt -package "$(REQUIRES)" \ $(I_OPTIONS) $(NATLINK_OPTIONS) \ -linkpkg -predicates netstring_minimum wtimer.cmxa main_cgi.cmx strip wtimer.cgi.opt wtimer-admin: wtimer-admin.$(TARGET) mv wtimer-admin.$(TARGET) wtimer-admin wtimer-admin.byte: wtimer.cma cmdline.cmo ocamlfind ocamlc -o wtimer-admin.byte -package "$(REQUIRES)" \ $(I_OPTIONS) $(BYTELINK_OPTIONS) \ -linkpkg -predicates netstring_minimum wtimer.cma cmdline.cmo wtimer-admin.opt: wtimer.cmxa cmdline.cmx ocamlfind ocamlopt -o wtimer-admin.opt -package "$(REQUIRES)" \ $(I_OPTIONS) $(BYTELINK_OPTIONS) \ -linkpkg -predicates netstring_minimum wtimer.cmxa cmdline.cmx strip wtimer-admin.opt wtimerd: wtimerd.$(TARGET) wtimer.ui$(FORCE_BIN) mv wtimerd.$(TARGET) wtimerd wtimerd.byte: wtimer.cma main_ajp.cmo ocamlfind ocamlc -o wtimerd.byte -package "$(REQUIRES)" \ $(I_OPTIONS) $(BYTELINK_OPTIONS) \ -linkpkg -predicates netstring_minimum wtimer.cma main_ajp.cmo wtimerd.opt: wtimer.cmxa main_ajp.cmx ocamlfind ocamlopt -o wtimerd.opt -package "$(REQUIRES)" \ $(I_OPTIONS) $(NATLINK_OPTIONS) \ -linkpkg -predicates netstring_minimum wtimer.cmxa main_ajp.cmx strip wtimerd.opt wtimer.cma: $(OBJS) ocamlc -a -o wtimer.cma $(OBJS) wtimer.cmxa: $(XOBJS) ocamlopt -a -o wtimer.cmxa $(XOBJS) wtimer.ui.bin: wtimer.ui *.ui *.xml ocamlfind wd-xmlcompiler/wd-xmlcompile wtimer.ui wtimer.ui: main.ui cp main.ui wtimer.ui const.ml: const.mlp Makefile.conf sed -e 's:@VERSION@:$(VERSION):g' \ -e 's:@WTIMER_DIR@:$(WTIMER_DIR):g' \ -e 's:@UI_DIR@:$(UI_DIR):g' const.mlp >const.ml db.cmo: db.ml Makefile.conf $(OCAMLC) -c -g -pp 'sed -e s:DBVARIANT:$(DBVARIANT):g' $< db.cmx: db.ml Makefile.conf $(OCAMLOPT) -c -pp 'sed -e s:DBVARIANT:$(DBVARIANT):g' $< #---------------------------------------------------------------------- # general rules: OPTIONS = OCAMLC = $(OCAMLFIND) ocamlc -g $(OPTIONS) -package "$(REQUIRES)" OCAMLOPT = $(OCAMLFIND) ocamlopt $(OPTIONS) -package "$(REQUIRES)" OCAMLDEP = ocamldep $(OPTIONS) OCAMLFIND = ocamlfind depend: *.ml *.mli if [ "x$(TARGET)" = "xopt" ]; then \ $(OCAMLDEP) -native *.ml *.mli >depend; \ else \ $(OCAMLDEP) *.ml *.mli >depend; \ fi .SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly .ml.cmx: $(OCAMLOPT) -c $< .ml.cmo: $(OCAMLC) -c -g $< .mli.cmi: $(OCAMLC) -c $< .mll.ml: ocamllex $< *.mli: include Makefile.conf include depend