-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
51 lines (38 loc) · 1.43 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
JAVA_HOME := $(GRAALVM_HOME)
PATH := $(GRAALVM_HOME)/bin:$(shell echo $$PATH)
LLVM_TOOLCHAIN := $(shell $(GRAALVM_HOME)/bin/lli --print-toolchain-path)
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
OSFLAG = +linux
endif
ifeq ($(UNAME), Darwin)
OSFLAG = +macos
endif
clean:
-rm sdl_example
-rm -r example-src/*
-rm -r target
-rm -r libs/*
-rm -r classes/*
-rm -r examples/*/gen-src
dev-repl:
REPLING=true lein with-profiles +socket,+compare-files repl
sdl-poly: assert-graal assert-clang
LLVM_TOOLCHAIN=${LLVM_TOOLCHAIN} lein with-profiles $(OSFLAG),+sdl-poly,+socket do clean, run
ncurses-poly: assert-graal assert-clang
LLVM_TOOLCHAIN=${LLVM_TOOLCHAIN} lein with-profiles $(OSFLAG),+ncurses-poly,+socket do clean, run
bounce-poly: assert-graal assert-clang
LLVM_TOOLCHAIN=${LLVM_TOOLCHAIN} lein with-profiles $(OSFLAG),+bounce-poly,+socket do clean, run
sdl-ni: assert-graal assert-clang
NATIVE_IMAGE=true NI_EXAMPLE=sdl ./compile && LD_LIBRARY_PATH=./libs ./sdl_example
ncurses-ni: assert-graal assert-clang
NATIVE_IMAGE=true NI_EXAMPLE=ncurses ./compile && LD_LIBRARY_PATH=./libs ./ncurses_example
bounce-ni: assert-graal assert-clang
NATIVE_IMAGE=true NI_EXAMPLE=bounce ./compile && LD_LIBRARY_PATH=./libs ./bounce_example
assert-graal:
@ if [ "${GRAALVM_HOME}" = "" ]; then \
echo "\n Error: You must set or pass in the GRAALVM_HOME environment variable.\n"; \
exit 1; \
fi
assert-clang:
${LLVM_TOOLCHAIN}/clang --version