From 670acb35f09c59e599f4fc7371b33613e567f830 Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Wed, 9 Feb 2022 18:31:41 +0000 Subject: [PATCH] Add a basic install target to the Makefile Helpful when building a package. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.39.2