Debian Codegraph @

Makefile

raw
1 # Makefile
2 # --------
3 # Copyright : (c) 2012, Jeremie Dimino <[email protected]>
4 # Licence : BSD3
5 #
6 # Generic Makefile for oasis project
7
8 # Set to setup.exe for the release
9 SETUP := setup-dev.exe
10
11 # Default rule
12 default: build
13
14 # Setup for the development version
15 setup-dev.exe: _oasis setup.ml
16 ./config_pkg || true
17 sed '/^#/D' setup.ml > setup_dev.ml
18 ocamlfind ocamlopt -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup_dev.ml || \
19 ocamlfind ocamlc -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup_dev.ml || true
20 rm -f setup_dev.*
21
22 # Setup for the release
23 setup.exe: setup.ml
24 ./config_pkg || true
25 ocamlopt.opt -o $@ $< || ocamlopt -o $@ $< || ocamlc -o $@ $<
26 rm -f setup.cmx setup.cmi setup.o setup.obj setup.cmo
27
28 build: $(SETUP) setup.data
29 ./$(SETUP) -build $(BUILDFLAGS)
30
31 doc: $(SETUP) setup.data build
32 ./$(SETUP) -doc $(DOCFLAGS)
33
34 test: $(SETUP) setup.data build
35 ./$(SETUP) -test $(TESTFLAGS)
36
37 all: $(SETUP)
38 ./$(SETUP) -all $(ALLFLAGS)
39
40 install: $(SETUP) setup.data
41 ./$(SETUP) -install $(INSTALLFLAGS)
42
43 uninstall: $(SETUP) setup.data
44 ./$(SETUP) -uninstall $(UNINSTALLFLAGS)
45
46 reinstall: $(SETUP) setup.data
47 ./$(SETUP) -reinstall $(REINSTALLFLAGS)
48
49 clean: $(SETUP)
50 ./$(SETUP) -clean $(CLEANFLAGS)
51
52 distclean: $(SETUP)
53 ./config_pkg --distclean || true
54 ./$(SETUP) -distclean $(DISTCLEANFLAGS)
55 rm -f setup*.exe
56
57 configure: $(SETUP)
58 ./$(SETUP) -configure $(CONFIGUREFLAGS)
59
60 setup.data: $(SETUP)
61 ./$(SETUP) -configure $(CONFIGUREFLAGS)
62
63 .PHONY: default build doc test all install uninstall reinstall clean distclean configure