summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon GECOS <u@adam>2021-03-03 23:09:46 -0500
committerGordon GECOS <u@adam>2021-03-03 23:34:26 -0500
commit8ff2464935825c3e096a3d30eb02c3f429026961 (patch)
treedc69c1bb745c5b5c3ca31dbf0f8365a2471f0b0c
parenta9d2d9eb91b7593d59d4647034be94e6417f28ba (diff)
Add Makefile.
Targets: make penetrated make install Default target is install.
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6b461ec
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
1.DEFAULT_GOAL = install
2
3binaries = penme unpenme
4dependencies = arp-scan
5
6prefix = /usr
7bindir = $(prefix)/bin
8
9sudo = $(shell [ "$$(id -u)" = 0 ] || echo ' sudo')
10age = $(shell echo $$(( $$(date +%s -d now) - $$(stat -c %Y $@) )) )
11
12.PHONY: install-depends-stamp install penetrated
13install-depends-stamp:
14 [ ! -e $@ ] || [ $(age) -lt 86400 ] || rm -f $@
15 [ -e $@ ] || $(sudo) apt install --no-upgrade $(dependencies)
16 [ -e $@ ] || touch $@
17
18install: install-depends-stamp $(binaries)
19 $(sudo) install $(binaries) -t $(DESTDIR)$(bindir)
20
21penetrated: install
22 penme