-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
58 lines (39 loc) · 1.01 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
package=snodge
version:=$(shell git describe --tags --always --dirty=-local --match='r*' | sed -e 's/^r//')
platforms:=$(notdir $(wildcard platform/*))
ifndef JAR
JAR:=$(shell jenv which jar)
endif
ifndef JAVA
JAVA:=$(shell jenv which java)
endif
KOTLIN=kotlin
ifndef KOTLINHOME
KOTLINHOME:=$(realpath $(shell which $(KOTLIN))/../..)
endif
ifndef DOKKA
DOKKA=dokka
endif
srcfiles=$(shell find $(wildcard common/src/$2 platform/$1/src/$2) -name '*.kt')
topath=$(subst $(eval) ,:,$1)
all: $(platforms)
include $(platforms:%=Makefile_%)
clean:
rm -rf out
distclean: clean
rm -rf platform/jvm/libs/
again: clean all
ci: $(platforms:%=%-ci)
tested: $(platforms:%=%-tested)
ifeq "$(origin version)" "command line"
tagged:
git tag -s r$(version) -m "tagging version $(version)"
else
tagged:
@echo set the version to tag on the command line
@false
endif
published: $(platforms:%=%-published)
print-%:
@echo "$* ($(flavor $*)) = $($*)"
.PHONY: all clean distclean tested tagged ci published $(platforms)