-
Notifications
You must be signed in to change notification settings - Fork 3
/
OMakefile
65 lines (52 loc) · 1.26 KB
/
OMakefile
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.PHONY: all check install clean
.SUBDIRS:
USE_OCAMLFIND = true
OCAMLPACKS[] =
oUnit
extlib
num
if $(not $(OCAMLFIND_EXISTS))
eprintln('This project requires ocamlfind, but is was not found.')
eprintln('You need to install ocamlfind and run "omake --configure".')
exit 1
NATIVE_ENABLED = $(OCAMLOPT_EXISTS)
BYTE_ENABLED = $(not $(OCAMLOPT_EXISTS))
public.UseCamlp4(files) =
protected.CAMLP4CMO = $(addprefix $(ROOT)/camlp4/,$(addsuffix .cmo,$(files)))
OCAMLPPFLAGS+=-pp 'camlp4o $(CAMLP4CMO)'
OCAMLDEPFLAGS+=-pp 'camlp4o $(CAMLP4CMO)'
export
.SCANNER: scan-ocaml-%.ml: %.ml $(CAMLP4CMO)
OCAML_WARN_FLAGS=-w A -warn-error A -annot
OCAMLFLAGS=$`(OCAML_WARN_FLAGS) #`
OCAMLFLAGS +=
OCAMLCFLAGS +=
OCAMLOPTFLAGS +=
OCAML_LINK_FLAGS +=
OCAML_BYTE_LINK_FLAGS +=
OCAML_NATIVE_LINK_FLAGS +=
FILES[] =
base
hList
server
logger
webSocket
bigIntUtil
parsec
UseCamlp4($(EMPTY))
TEST_FILES[] =
loggerTest
bigIntUtilTest
webSocketTest
PROGRAM = main
TEST_PROGRAM = runner
OCAML_LIBS +=
OCAML_CLIBS +=
OCAML_OTHER_LIBS +=
OCAML_LIB_FLAGS +=
.DEFAULT : all
all: $(OCamlProgram $(PROGRAM), main $(FILES))
check : $(OCamlProgram $(TEST_PROGRAM), $(TEST_FILES) $(FILES))
./$(TEST_PROGRAM)
clean:
rm -f $(PROGRAM) $(TEST_PROGRAM) *.cm[iox] *.opt *.run *~ *.out *.o