-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
29 lines (22 loc) · 835 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
INSTALLDIR=/usr/local/bin/
WEBROOT=/usr/local/sambactl/
SERVER_SRCS+= sambactl-server/main.go
WORKER_SRCS+= sambactl-worker/main.go
all: build
build: sambactl-worker/sambactl-worker sambactl-server/sambactl-server
sambactl-server/sambactl-server: ${SERVER_SRCS}
cd sambactl-server && go build
sambactl-worker/sambactl-worker: ${WORKER_SRCS}
cd sambactl-worker && go build
clean:
rm -f sambactl-worker/sambactl-worker
rm -f sambactl-server/sambactl-server
install: build
mkdir -p ${INSTALLDIR}
install sambactl-worker/sambactl-worker ${INSTALLDIR}
install sambactl-server/sambactl-server ${INSTALLDIR}
install scripts/mysmbpasswd ${INSTALLDIR}/mysmbpasswd
install scripts/smb_adduser.sh ${INSTALLDIR}/smb_adduser
install scripts/smb_deluser.sh ${INSTALLDIR}/smb_deluser
mkdir -p ${WEBROOT}
cp -r webroot/* ${WEBROOT}