-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 817 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (25 loc) · 817 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
SRCS := mlstack.ml state.ml intrp.ml cycles.ml bytecrawler.ml
OPAMDIR := $(shell opam config var lib)
TARGET := bin/bytecrawler
FLAGS := -I +../obytelib -I src
OCAMLLIB := $(shell ocamlfind printconf stdlib)
OCAMLC := ocamlc
PACKAGE := csv
CMOFILES = $(SRCS:%.ml=%.cmo)
all: $(TARGET)
$(TARGET) : $(addprefix src/,$(SRCS))
ocamlfind ocamlc -linkpkg -package $(PACKAGE) $(FLAGS) obytelib.cma $+ -o $@
%.cmo: %.ml %.cmi
ocamlfind ocamlc -package $(PACKAGE) $(FLAGS) -c $*.ml
%.cmi: %.mli %.ml
ocamlfind ocamlc -package $(PACKAGE) $(FLAGS) -c $*.mli
%.cmo: %.ml
ocamlfind ocamlc -package $(PACKAGE) $(FLAGS) -c $*.ml
clean:
rm -f .depend
find . -name "*.cm*" -delete
rm -f bin/*
.PHONY: bytecrawler clean
.depend: $(MLSOURCES) Makefile
ocamldep -I src $(SRCS) > .depend
include .depend