-
Notifications
You must be signed in to change notification settings - Fork 153
/
Copy pathMakefile
44 lines (29 loc) · 842 Bytes
/
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
# controlled leading whitespace, per the GNU make manual
nullstring :=
space := $(nullstring) # end of the line
ifdef RELEASE
cargo_flags = $(space)--offline --locked --release
endif
ifdef TOOLCHAIN
cargo_toolchain = $(space)+$(TOOLCHAIN)
endif
all: postbuild
build: FORCE
cargo$(cargo_toolchain) build$(cargo_flags)
cargo-test: FORCE
cargo$(cargo_toolchain) test$(cargo_flags) --all-features
cargo-clean: FORCE
cargo clean
postbuild: build FORCE
cd postbuild && $(MAKE) -f Makefile
postbuild-install: FORCE
cd postbuild && $(MAKE) -f Makefile install
postbuild-clean: FORCE
cd postbuild && $(MAKE) -f Makefile clean
postbuild-distclean: FORCE
cd postbuild && $(MAKE) -f Makefile distclean
check: cargo-test
install: postbuild-install
clean: cargo-clean postbuild-clean
distclean: cargo-clean postbuild-distclean
FORCE: