Updated Makefile

This commit is contained in:
2017-09-14 20:28:43 +02:00
parent 93f4793075
commit 9e1807fcb0
2 changed files with 6 additions and 4 deletions

View File

@@ -1 +1,3 @@
#include <stdio.h>
#include <stdlib.h>

View File

@@ -5,12 +5,12 @@ VERSION = 1.0
CC = cc CC = cc
CFLAGS = -Wall -g -D_GNU_SOURCE -D_REENTRANT -DVERSION=\"$(VERSION)\" `mysql_config --cflags` CFLAGS = -Wall -g -D_GNU_SOURCE -D_REENTRANT -DVERSION=\"$(VERSION)\" `mysql_config --cflags`
#LDFLAGS = -lm -lpthread `gtk-config --cflags` `gtk-config --libs` -lgthread #LDFLAGS = -lm -lpthread `gtk-config --cflags` `gtk-config --libs` -lgthread
LDFLAGS = -lwiringPi -lconfig `mysql_config --libs` -lcurl -lm LDFLAGS = `mysql_config --libs` -lm
OBJ = main.o dht22.o sendmysql.o configreader.o cJSON.o restcurl.o calculate.o OBJ = main.o sendmysql.o calculate.o
dht22: $(OBJ) dht22: $(OBJ)
$(CC) $(CFLAGS) -o humiditypi $(OBJ) $(LDFLAGS) $(CC) $(CFLAGS) -o humidityserver $(OBJ) $(LDFLAGS)
%.o: %.c %.o: %.c
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<