summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2017-12-30 18:02:49 +0100
committerChristian Poessinger <christian@poessinger.com>2017-12-30 18:08:45 +0100
commit22cb537289b0fdacab9206ec64e811763677c0e2 (patch)
tree3600cc8e49ca88bfdd860812f713cc1619d726b5 /Makefile
parent33ef225f5b1d90c23915d0fa6fc49d2d783d4fe6 (diff)
downloadudp-broadcast-relay-22cb537289b0fdacab9206ec64e811763677c0e2.tar.gz
udp-broadcast-relay-22cb537289b0fdacab9206ec64e811763677c0e2.zip
Add support for Debian Packaging and systemd
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 14 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 7668c9e..61cf567 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,16 @@
-udp-broadcast-relay: main.c
- gcc -g main.c -o udp-broadcast-relay
+udp-broadcast-relay: udp-broadcast-relay.c
+ gcc -O0 udp-broadcast-relay.c -o udp-broadcast-relay
clean:
- rm -f udp-broadcast-relay
+ -$(RM) *.o
+ -$(RM) udp-broadcast-relay
+ -$(RM) build-stamp
+ -$(RM) -rf debian/udp-broadcast-relay
+
+install:
+ install -d $(DESTDIR)/usr/sbin
+ install -d $(DESTDIR)/lib/systemd/system
+ install -d $(DESTDIR)/etc/default
+ install -m 0755 udp-broadcast-relay $(DESTDIR)/usr/sbin
+ install -m 0644 udp-broadcast-relay.service $(DESTDIR)/lib/systemd/system
+ install -m 0644 udp-broadcast-relay.default $(DESTDIR)/etc/default/udp-broadcast-relay