-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (25 loc) · 817 Bytes
/
Makefile
File metadata and controls
33 lines (25 loc) · 817 Bytes
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
builder := go
builddir := bin
exe := wgldapmanager
instdir := /usr/local/bin
#config := .env.sample
#systemd := piproxyclient.service
#install := install.sh
all: $(builddir)/$(exe) #$(builddir)/$(config) $(install) $(builddir)/$(systemd)
#$(builddir)/$(config): $(config)
# cp $(config) $(builddir)/$(config)
#$(builddir)/$(install): $(install)
# cp $(install) $(builddir)/$(install)
#$(builddir)/$(systemd): $(systemd)
# cp $(systemd) $(builddir)/$(systemd)
$(builddir)/$(exe): main.go go.mod go.sum models router utils
$(builder) build -o $(builddir)/$(exe) $<
install: $(instdir)/$(exe)
$(instdir)/$(exe): $(builddir)/$(exe)
cp $(builddir)/$(exe) $(instdir)/$(exe)
chown root:root $(instdir)/$(exe)
chmod 4755 $(instdir)/$(exe)
uninstall:
rm -rf $(instdir)/$(exe)
clean:
rm -rf $(builddir)