Newer
Older
WH1080 / Makefile
@Alex Tucker Alex Tucker on 29 Nov 2016 599 bytes Forgot to free(msg).
CC=gcc
CFLAGS=-c -Wall

all: wh1080_rf

wh1080_rf: wh1080_rf.o bcm2835.o bmp085.o wunderground.o mqtt.o
	$(CC) -lm -lconfig -lmosquitto wh1080_rf.o bcm2835.o bmp085.o wunderground.o mqtt.o -o wh1080_rf

wh1080_rf.o: wh1080_rf.c
	$(CC) $(CFLAGS) wh1080_rf.c

bcm2835.o: bcm2835.c
	$(CC) $(CFLAGS) bcm2835.c

bmp085.o: bmp085.c
	$(CC) $(CFLAGS) bmp085.c

wunderground.o: wunderground.c
	$(CC) $(CFLAGS) wunderground.c

mqtt.o: mqtt.c
	$(CC) $(CFLAGS) mqtt.c

clean:
	rm -f wh1080_rf.o bcm2835.o bmp085.o wunderground.o mqtt.o wh1080_rf

install: wh1080_rf
	install wh1080_rf /usr/local/sbin/wh1080_rf