forked from retrogradeorbit/bootleg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (50 loc) · 1.66 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
57
58
59
60
GRAALVM = $(HOME)/graalvm-ce-java11-20.1.0
JAVA_HOME = $(GRAALVM)
PATH = $(GRAALVM)/bin:$(shell echo $$PATH)
SRC = src/bootleg/core.clj
VERSION = $(shell cat .meta/VERSION | xargs)
all: build/bootleg
clean:
-rm -rf build target
lein clean
target/uberjar/bootleg-$(VERSION)-standalone.jar: $(SRC)
GRAALVM_HOME=$(GRAALVM) lein uberjar
analyse:
$(GRAALVM)/bin/java -agentlib:native-image-agent=config-output-dir=config-dir \
-jar target/uberjar/bootleg-$(VERSION)-standalone.jar
build/bootleg: target/uberjar/bootleg-$(VERSION)-standalone.jar
-mkdir build
export
$(GRAALVM)/bin/native-image \
-jar target/uberjar/bootleg-$(VERSION)-standalone.jar \
-H:Name=build/bootleg \
-H:+ReportExceptionStackTraces \
-J-Dclojure.spec.skip-macros=true \
-J-Dclojure.compiler.direct-linking=true \
-H:ConfigurationFileDirectories=graal-configs/ \
--initialize-at-build-time \
-H:Log=registerResource: \
-H:EnableURLProtocols=http,https \
--verbose \
--allow-incomplete-classpath \
--no-fallback \
--no-server \
"-J-Xmx6g"
tests:
lein test
copy-libs-to-resource:
-cp $(GRAALVM)/jre/lib/sunec.lib resources
-cp $(GRAALVM)/jre/bin/sunec.dll resources
-cp $(GRAALVM)/jre/lib/libsunec.dylib resources
-cp $(GRAALVM)/jre/lib/amd64/libsunec.so resources
package-linux:
cd build && tar cvzf bootleg-$(VERSION)-linux-amd64.tgz bootleg
cp build/*.tgz ./
cp target/uberjar/bootleg-$(VERSION)-standalone.jar bootleg-$(VERSION).jar
package-macos:
cd build && zip bootleg-$(VERSION)-macos-amd64.zip bootleg
cp build/*.zip .
rm -rf /tmp/release
mkdir -p /tmp/release
cp build/*.zip /tmp/release
#cp target/uberjar/bootleg-$(VERSION)-standalone.jar bootleg-$(VERSION).jar