Skip to content

Commit e59a1a7

Browse files
committed
Add a makefile
Signed-off-by: Davide Cavalca <[email protected]>
1 parent 662f8af commit e59a1a7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
DESTDIR ?=
2+
PREFIX ?= /usr
3+
GENERATORSDIR ?= $(PREFIX)/lib/systemd/system-generators
4+
5+
RUSTFLAGS ?= --release
6+
7+
ROOTDIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
8+
9+
all: build
10+
11+
build:
12+
cargo build $(RUSTFLAGS)
13+
14+
check:
15+
cargo test $(RUSTFLAGS)
16+
17+
clean:
18+
rm -rf target
19+
20+
install:
21+
install -Dpm0755 -t $(DESTDIR)$(GENERATORSDIR)/ target/release/fex-emu-rootfs-generator
22+
23+
uninstall:
24+
rm -f $(DESTDIR)$(GENERATORSDIR)/fex-emu-rootfs-generator
25+
26+
27+
.PHONY: check install uninstall

0 commit comments

Comments
 (0)