-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (31 loc) · 784 Bytes
/
Makefile
File metadata and controls
43 lines (31 loc) · 784 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
34
35
36
37
38
39
40
41
42
43
PROG = keylock
INSTALL ?= install
RM ?= rm -f
MKDIR ?= install -d
PREFIX ?= /usr/local
BINDIR = ${DESTDIR}${PREFIX}/bin
OBJDIR = .build
RELDIR = ${OBJDIR}/release
all: build
bootstrap:
${MKDIR} ${BINDIR}
build:
swift build -c release
debug:
swift build -c debug
install: bootstrap build
${INSTALL} ${RELDIR}/${PROG} ${BINDIR}/${PROG}
uninstall:
${RM} ${BINDIR}/${PROG}
clean:
${RM} -r ${OBJDIR}
.DEFAULT:
@echo "Usage: make [target]"
@echo
@echo "Targets:"
@echo " build Build the project in release mode"
@echo " debug Build the project in debug mode"
@echo " install Install the project"
@echo " uninstall Uninstall the project"
@echo " clean Clean the project"
.PHONY: all bootstrap build debug install uninstall clean