-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (40 loc) · 2.13 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
CC=gcc
CFLAGS=-Ijson-c-0.14 -I. -Wunused-function -Wunused-variable -g
LDFLAGS=-Ljson-c-build
SYS: longsize.h mqttLocalLogger mqttLocalLoggerCSV test_jsonPath feedValuesToMQTT postProcessJsonToCSV ProcessJsonToCSV
touch SYS
longsize.h: longsize.c
$(CC) longsize.c -o longsize
echo "#define LONGSIZE `./longsize`" > longsize.h
mqttLocalLogger: mqttLocalLogger.o counterFunc.o
$(CC) mqttLocalLogger.o counterFunc.o -o mqttLocalLogger $(CFLAGS) $(LDFLAGS) -lm -ljson-c -lmosquitto
mqttLocalLogger.o: mqttLocalLogger.c counterFunc.h
$(CC) -c mqttLocalLogger.c $(CFLAGS) -I/usr/include/json-c/
mqttLocalLoggerCSV: mqttLocalLoggerCSV.o counterFunc.o
$(CC) mqttLocalLoggerCSV.o counterFunc.o -o mqttLocalLoggerCSV -Wall $(CFLAGS) $(LDFLAGS) -lm -ljson-c -lmosquitto -lncurses
mqttLocalLoggerCSV.o: mqttLocalLoggerCSV.c counterFunc.h
$(CC) -c mqttLocalLoggerCSV.c -Wall $(CFLAGS) -I/usr/include/json-c/
test_jsonPath: test_jsonPath.o
$(CC) test_jsonPath.o -o test_jsonPath $(CFLAGS) $(LDFLAGS) -lm -ljson-c -lmosquitto
test_jsonPath.o: test_jsonPath.c
$(CC) -c test_jsonPath.c $(CFLAGS) -I/usr/include/json-c/
feedValuesToMQTT: feedValuesToMQTT.o
$(CC) feedValuesToMQTT.o -o feedValuesToMQTT $(CFLAGS) $(LDFLAGS) -lm -lmosquitto
feedValuesToMQTT.o: feedValuesToMQTT.c
$(CC) -c feedValuesToMQTT.c $(CFLAGS)
MqttJsonTransformer: MqttJsonTransformer.o
$(CC) MqttJsonTransformer.o -o MqttJsonTransformer $(CFLAGS) $(LDFLAGS) -lm -lmosquitto
MqttJsonTransformer.o: MqttJsonTransformer.c
$(CC) -c MqttJsonTransformer.c $(CFLAGS) -I/usr/include/json-c/
postProcessJsonToCSV: postProcessJsonToCSV.c
$(CC) -g postProcessJsonToCSV.c -o postProcessJsonToCSV $(CFLAGS) $(LDFLAGS) -I/usr/include/json-c/ -ljson-c
ProcessJsonToCSV: ProcessJsonToCSV.o queue.o
$(CC) ProcessJsonToCSV.o queue.o -o ProcessJsonToCSV -Wall $(CFLAGS) $(LDFLAGS) -lm -ljson-c -lmosquitto -lncurses
ProcessJsonToCSV.o: ProcessJsonToCSV.c
$(CC) -c ProcessJsonToCSV.c -Wall $(CFLAGS) -I/usr/include/json-c/
queue.o: queue.c
$(CC) -c queue.c -Wall $(CFLAGS)
counterFunc.o: counterFunc.c counterFunc.h
$(CC) -c counterFunc.c -Wall $(CFLAGS)
clean:
rm -f *.o