-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
54 lines (40 loc) · 1.2 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
root_dir ?= $(PWD)
SBT ?= sbt
SBT_FLAGS ?= -Dsbt.log.noformat=true
MKDIR ?= mkdir -p
CURL ?= curl -L
MILL_BIN ?= $(HOME)/bin/mill
MILL ?= $(MILL_BIN) --color false
# Ensure the default target is something reasonable.
default: build
# Fetch mill (if we don't have it.
$(MILL_BIN):
$(MKDIR) $(dir $@)
$(CURL) -o $@ https://github.com/ucbjrl/mill/releases/download/v0.2.3-FDF/mill-0.2.3-FDF && chmod +x $@
mill-tools: $(MILL_BIN)
# Compile and package jar
mill.build: mill-tools
$(MILL) firrtlInterpreter.jar
# Compile and test
mill.test: mill-tools
$(MILL) firrtlInterpreter.test
# Build and publish jar
mill.publishLocal: mill-tools
$(MILL) firrtlInterpreter.publishLocal
# Compile and package all jar
mill.build.all: mill-tools
$(MILL) firrtlInterpreter[_].jar
# Compile and test
mill.test.all: mill-tools
$(MILL) firrtlInterpreter[_].test
# Build and publish jar
mill.publishLocal.all: mill-tools
$(MILL) firrtlInterpreter[_].publishLocal
# Remove all generated code.
# Until "mill clean" makes it into a release.
mill.clean:
$(RM) -rf out
clean: mill.clean
$(SBT) "+clean"
build: mill.build
.PHONY: build clean mill.build mill.test mill.publishLocal mill.build.all mill.test.all mill.publishLocal.all