]> the.earth.li Git - mqtt-arp.git/blob - Makefile
Add a basic install target to the Makefile
[mqtt-arp.git] / Makefile
1 CC = gcc
2 CFLAGS = -Wall
3 LDFLAGS =
4
5 all: mqtt-arp
6
7 mqtt-arp: mqtt-arp.o
8         $(CC) -o $@ $< $(LDFLAGS) -lmosquitto
9
10 install: mqtt-arp
11         install -d $(DESTDIR)/etc
12         install -d $(DESTDIR)/usr/sbin
13         install mqtt-arp $(DESTDIR)/usr/sbin/
14         install -m 600 mqtt-arp.conf $(DESTDIR)/etc/
15
16 %.o: %.c
17         $(CC) -c -o $@ $< $(CFLAGS)
18
19 .PHONY: clean
20
21 clean:
22         rm -f mqtt-arp *.o