forked from eatonphil/ponyo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (41 loc) · 1.19 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
.PHONY: all ssl.so bin/ponyo-make bin/ponyo bin/ponyo-doc bin/ponyo-top clean test
default: all
UNAME:=$(shell uname)
GCC_INCLUDES=
ifeq ($(UNAME), Darwin)
GCC_INCLUDES="-I/usr/local/opt/openssl/include"
endif
SML_BACKEND?="polyml"
ssl.so: lib/ssl.c
gcc $(GCC_INCLUDES) -shared -fPIC -o $@ -lcrypto -lssl $<
bin/ponyo-make: tool/make/build.sml
@mkdir -p bin
polyc -o $@ $<
bin/ponyo: tool/ponyo.sml bin/ponyo-make
@mkdir -p bin
bin/ponyo-make $< -b $(SML_BACKEND) -o $@
bin/ponyo-doc: tool/doc/build.mlb tool/doc/generate.sml tool/doc/doc.sml bin/ponyo bin/ponyo-make
@mkdir -p bin
bin/ponyo-make tool/doc/doc.sml -f tool/doc/generate.sml -b $(SML_BACKEND) -o $@
bin/ponyo-top: tool/top/top.sml bin/ponyo bin/ponyo-make
@mkdir -p bin
bin/ponyo-make $< -b polyml -o $@
bin/ponyo-test: tool/test/test.sml bin/ponyo bin/ponyo-make
@mkdir -p bin
bin/ponyo-make $< -b $(SML_BACKEND) -o $@
all:
$(MAKE) ssl.so
$(MAKE) bin/ponyo-make
$(MAKE) bin/ponyo
$(MAKE) bin/ponyo-top
$(MAKE) bin/ponyo-doc
$(MAKE) bin/ponyo-test
install:
ln -s bin/* /usr/local/bin
uninstall:
rm /usr/local/bin/ponyo*
test: test/*.sml bin/ponyo-test
@mkdir -p bin
ponyo-test -b $(SML_BACKEND)
clean:
rm -rf bin ssl.so