summaryrefslogtreecommitdiff
path: root/mfi-mqtt/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mfi-mqtt/Makefile')
-rw-r--r--mfi-mqtt/Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/mfi-mqtt/Makefile b/mfi-mqtt/Makefile
index a30dfbd..96b1016 100644
--- a/mfi-mqtt/Makefile
+++ b/mfi-mqtt/Makefile
@@ -1,12 +1,18 @@
1BUILDROOT := $(HOME)/tmp/buildroot-2019.02.7 1BUILDROOT := $(HOME)/tmp/buildroot-2019.02.7
2MIPS_GCC := $(BUILDROOT)/output/host/bin/mips-buildroot-linux-uclibc-gcc 2MIPS_GCC := $(BUILDROOT)/output/host/bin/mips-buildroot-linux-uclibc-gcc
3MIPS_STRIP := $(BUILDROOT)/output/host/mips-buildroot-linux-uclibc/bin/strip
4VERSION := $(shell git describe --tags --dirty --long)
5
6mfi-mqtt-mips-stripped: mfi-mqtt-mips
7 cp $< $@
8 $(MIPS_STRIP) $@
3 9
4mfi-mqtt-mips: reporting.o mosquitto.o mfi-mqtt.o 10mfi-mqtt-mips: reporting.o mosquitto.o mfi-mqtt.o
5 $(MIPS_GCC) -o $@ $^ -lpthread -lmosquitto -ljson-c -static 11 $(MIPS_GCC) -o $@ $^ -lpthread -lmosquitto -ljson-c -static
6 12
7%.o: %.c 13%.o: %.c
8 $(MIPS_GCC) -Wall -c -o $@ $< 14 $(MIPS_GCC) -DVERSION=$(VERSION) -Wall -c -o $@ $<
9 15
10.PHONY: clean 16.PHONY: clean
11clean: 17clean:
12 rm -f *.o mfi-mqtt-mips 18 rm -f *.o mfi-mqtt-mips mfi-mqtt-mips-stripped