aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e578636..fdd9081 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,18 @@
CFLAGS = -O3 -Wall -Wextra
PREFIX = /usr/local
+all: burstdog burstdog.rc
+
burstdog: burstdog.c
$(CC) $(CFLAGS) burstdog.c -o burstdog
+burstdog.rc: burstdog.rc.in
+ sed 's#%BINPATH%#$(PREFIX)/bin#g' burstdog.rc.in > burstdog.rc
+
install: burstdog
install -Dm 755 burstdog "$(PREFIX)/bin/burstdog"
-.PHONY: install
+install-rc: burstdog.rc install
+ install -Dm 755 burstdog.rc /etc/init.d/burstdog
+
+.PHONY: install install-rc