-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
63 lines (44 loc) · 1.5 KB
/
makefile
File metadata and controls
63 lines (44 loc) · 1.5 KB
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
# ------------------------------------------------------------------------------
default: build
# SPEC -------------------------------------------------------------------------
NAME := robinmap
VERSION := 0.1.0
# PATHS ------------------------------------------------------------------------
ifeq ($(OS) , Windows_NT)
SEP := ;
else
SEP := :
endif
output := out/production/$(NAME)
test := out/test/$(NAME)
cp := "$(output)"
testcp := "$(output)$(SEP)$(test)"
# CLEAN ------------------------------------------------------------------------
clean:
rm -rf out
# BUILD & TEST -----------------------------------------------------------------
build:
mkdir -p $(output)
kotlinc -cp $(cp) src -d $(output)
mkdir -p $(test)
kotlinc -cp $(testcp) test -d $(test)
test:
kotlin -cp $(testcp) norswap.triemap.TestKt
# JAR --------------------------------------------------------------------------
jar:
find out -name .DS_Store -type f -delete
jar cf out/$(NAME)-$(VERSION).jar -C $(output) .
# PROFILE ----------------------------------------------------------------------
klib := $(realpath $(dir $(shell which kotlin))../lib)
javacp := "$(output)$(SEP)$(test)$(SEP)$(klib)/kotlin-runtime.jar"
trace:
java -cp $(javacp) -agentlib:hprof=cpu=samples,interval=1 $(target)
# ------------------------------------------------------------------------------
.PHONY: \
default \
clean \
build \
build-tests \
test \
jar
# ------------------------------------------------------------------------------