From: Jonathan McDowell Date: Wed, 9 Feb 2022 18:31:41 +0000 (+0000) Subject: Add a basic install target to the Makefile X-Git-Url: https://the.earth.li/gitweb/?p=mqtt-arp.git;a=commitdiff_plain;h=670acb35f09c59e599f4fc7371b33613e567f830 Add a basic install target to the Makefile Helpful when building a package. --- diff --git a/Makefile b/Makefile index 2aefb52..75af65d 100644 --- 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)