forked from gbe/ocaml-fdinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (27 loc) · 1009 Bytes
/
Makefile
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
LIB = fdinfo
FLAGS =
OCAMLLIBDIR := $(shell ocamlc -where)
OCAMLDESTDIR ?= $(OCAMLLIBDIR)
OCAMLFIND_INSTALL_FLAGS ?= -destdir $(OCAMLDESTDIR) -ldconf ignore
all: byte native
interface:
ocamlc -o $(LIB).cmi -c $(LIB).mli
byte:interface
ocamlc $(FLAGS) -c $(LIB).ml
ocamlc -a -o $(LIB).cma $(LIB).cmo
native:interface
ocamlopt $(FLAGS) -c $(LIB).ml
ocamlopt -a -o $(LIB).cmxa $(LIB).cmx
test:
ocamlfind ocamlopt -linkpkg -package fdinfo -c test.ml
ocamlfind ocamlopt -linkpkg -package fdinfo str.cmxa fdinfo.cmxa -o test test.cmx
install:
ocamlfind install $(OCAMLFIND_INSTALL_FLAGS) $(LIB) META fdinfo.cmi fdinfo.mli fdinfo.cma fdinfo.cmxa *.a *.cmx
install-byte:
ocamlfind install $(OCAMLFIND_INSTALL_FLAGS) $(LIB) META fdinfo.cmi fdinfo.mli fdinfo.cma
install-native:
ocamlfind install $(OCAMLFIND_INSTALL_FLAGS) $(LIB) META fdinfo.cmi fdinfo.mli fdinfo.cmxa *.a *.cmx
uninstall:
ocamlfind remove $(OCAMLFIND_INSTALL_FLAGS) $(LIB)
clean:
rm -f *.cm[oixa] *.cmxa *.annot *.[ao] *~ test