]> the.earth.li Git - mqtt-arp.git/blobdiff - Makefile
Add a basic install target to the Makefile
[mqtt-arp.git] / Makefile
index 2aefb524058675ef02427e00b8a8838c34c06e2c..75af65d85a12a6155b541436e5c14b4fd7dcc668 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,12 @@ all: mqtt-arp
 mqtt-arp: mqtt-arp.o
        $(CC) -o $@ $< $(LDFLAGS) -lmosquitto
 
+install: mqtt-arp
+       install -d $(DESTDIR)/etc
+       install -d $(DESTDIR)/usr/sbin
+       install mqtt-arp $(DESTDIR)/usr/sbin/
+       install -m 600 mqtt-arp.conf $(DESTDIR)/etc/
+
 %.o: %.c
        $(CC) -c -o $@ $< $(CFLAGS)