forked from greglook/solanum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (40 loc) · 1.34 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
# Build file for Solanum
default: package
.PHONY: setup clean lint test uberjar package
uberjar_path := target/uberjar/solanum.jar
version := $(shell grep defproject project.clj | cut -d ' ' -f 3 | tr -d \")
platform := $(shell uname -s | tr '[:upper:]' '[:lower:]')
release_name := solanum_$(version)_$(platform)
ifndef GRAAL_PATH
$(error GRAAL_PATH is not set)
endif
setup:
lein deps
clean:
rm -rf target dist solanum
lint:
lein check
test:
lein test
$(uberjar_path): src/**/* resources/* svm/java/**/*
lein with-profile +svm uberjar
uberjar: $(uberjar_path)
# TODO: further options
# --static
# --enable-url-protocols=http,https
solanum: reflection-config := svm/reflection-config.json
solanum: $(uberjar_path) $(reflection-config)
$(GRAAL_PATH)/bin/native-image \
--allow-incomplete-classpath \
--report-unsupported-elements-at-runtime \
--delay-class-initialization-to-runtime=io.netty.handler.ssl.ConscryptAlpnSslEngine \
--delay-class-initialization-to-runtime=io.netty.handler.ssl.ReferenceCountedOpenSslEngine \
--delay-class-initialization-to-runtime=io.netty.util.internal.logging.Log4JLogger \
-H:ReflectionConfigurationFiles=$(reflection-config) \
-J-Xms3G -J-Xmx3G \
--no-server \
-jar $<
dist/$(release_name).tar.gz: solanum
@mkdir -p dist
tar -cvzf $@ $^
package: dist/$(release_name).tar.gz