forked from nullpo-head/WSL-Hello-sudo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (33 loc) · 962 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
45
RELEASE := release
WIN_CARGO="cargo.exe"
.PHONY: all clean cleanall cleanrelease install release lint
all: build/pam_wsl_hello.so build/WindowsHelloBridge.exe
build/pam_wsl_hello.so: | build
# Build the PAM lib from Linux
cargo build --release -p wsl_hello_pam
strip target/release/libpam_wsl_hello.so
cp ./target/release/libpam_wsl_hello.so build/pam_wsl_hello.so
build/WindowsHelloBridge.exe: | build
# Build the authenticator from Windows
$(WIN_CARGO) build -p win_hello_bridge --release
strip target/release/WindowsHelloBridge.exe
cp ./target/release/WindowsHelloBridge.exe ./build
build:
mkdir -p build
clean:
cargo clean
cleanall: clean
cleanrelease: cleanall
rm -rf build
rm -rf $(RELEASE)
rm $(RELEASE).tar.gz
install: all
./install.sh
release: all
mkdir -p $(RELEASE)
cp -R build $(RELEASE)/
cp install.sh pam-config $(RELEASE)/
tar cvzf $(RELEASE).tar.gz $(RELEASE)
lint:
shellcheck install.sh
cargo clippy -- -D warnings