-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (33 loc) · 910 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
.SUFFIXES:
SHELL = /bin/sh
prefix ?=
bindir = $(prefix)/usr/bin
etcdir = $(prefix)/etc/webcron
sysdir = $(prefix)/usr/lib/systemd/system
RM = rm -f
INSTALL = install
.PHONY: help
help:
@echo "Usage: make [<options>] [<target>]"
@echo ""
@echo "Options:"
@echo " prefix=<path> Set alternate install/uninstall path"
@echo ""
@echo "Targets:"
@echo " help Display help"
@echo " install Install program"
@echo " uninstall Uninstall program"
.PHONY: install
install:
$(INSTALL) -d -m 0755 $(bindir)
$(INSTALL) -d -m 0755 $(etcdir)
$(INSTALL) -d -m 0755 $(sysdir)
$(INSTALL) -m 0755 src/webcron $(bindir)
$(INSTALL) -m 0644 src/[email protected] $(sysdir)
$(INSTALL) -m 0644 src/[email protected] $(sysdir)
$(INSTALL) -m 0644 src/config/*.conf $(etcdir)
.PHONY: uninstall
uninstall:
$(RM) $(bindir)/webcron
$(RM) $(sysdir)/[email protected]
$(RM) $(sysdir)/[email protected]