-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (24 loc) · 965 Bytes
/
Makefile
File metadata and controls
36 lines (24 loc) · 965 Bytes
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
PACKAGES=camlp5,pa_ppx.deriving_plugins.sexp,sexplib,cmdliner,pa_ppx.utils,pa_ppx.located_sexp,pa_ppx.runtime_fat
SYNTAX=camlp5o
OCAMLCFLAGS= -package $(PACKAGES) -syntax $(SYNTAX) -g
YAWRAP=ocamlfind camlp5-buildscripts/ya-wrap-ocamlfind
OCAMLC=$(YAWRAP) ocamlfind ocamlc
all: cppffigen cppffigen_example
cppffigen: cppffigen.cmo cppffigen_main.cmo
$(OCAMLC) $(OCAMLCFLAGS) -linkall -linkpkg -o cppffigen $^
cppffigen_example: cppffigen.cmo cppffigen_example.cmo
$(OCAMLC) $(OCAMLCFLAGS) -linkall -linkpkg -o cppffigen_example $^
.ml.cmo:
$(OCAMLC) $(OCAMLCFLAGS) -c $<
test: all
make -C examples/ex1 clean all test
clean::
rm -f *.cm* cppffigen cppffigen_example
make -C examples/ex1 clean
install: all
ocamlfind install cppffigen META cppffigen cppffi.inc cppffi.h
uninstall::
ocamlfind remove cppffigen
.SUFFIXES: .cmo .cmi .ml .mll .mly .mli .cmx .cma .cmxa .cmt .cmti
cppffigen_main.cmo: cppffigen.cmi
cppffigen_example.cmo: cppffigen.cmi