-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
45 lines (37 loc) · 916 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
39
40
41
42
43
44
45
OCAMLMAKEFILE = OCamlMakefile
ANNOTATE = yes
export ANNOTATE
LLVM ?= /opt/local
define PROJ_abnf
SOURCES=abnf_syntaxtree.ml abnf_rules.ml abnf_ops.ml abnf_location.ml abnf_parser.mli abnf_lexer.ml abnf_parser.ml abnf_recursive_descent.ml abnf_signature.ml abnf_cmd.ml
RESULT=abnf_cmd
LIBS=str
TRASH=abnf_lexer.ml abnf_parser.ml abnf_lexer.mli abnf_parser.mli
endef
export PROJ_abnf
define PROJ_imapd
SOURCES=imap_parser.ml imap_terms.ml imap_rules.ml imapd.ml
RESULT=imapd
endef
export PROJ_imapd
define PROJ_llvm
SOURCES=llvmtest.ml
RESULT=llvmtest
INCDIRS=$(LLVM)/lib/ocaml
LIBS=llvm llvm_bitwriter
CLIBS=stdc++ llvm
endef
export PROJ_llvm
ifndef SUBPROJS
export SUBPROJS=abnf imapd
endif
all: dc
@ :
lltest:
./llvmtest foo.bc
$(LLVM)/bin/llvm-dis foo.bc > foo.ll
$(LLVM)/bin/llvmc foo.ll -o foo
./foo; echo $$?
cat foo.ll
%:
@make -f $(OCAMLMAKEFILE) subprojs SUBTARGET=$@