New Structure
This commit is contained in:
25
RaspberryPi/makefile
Normal file
25
RaspberryPi/makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
#Infos: http://www.ijon.de/comp/tutorials/makefile.html
|
||||
|
||||
|
||||
VERSION = 1.0
|
||||
CC = /usr/bin/gcc
|
||||
CFLAGS = -Wall -g -D_GNU_SOURCE -D_REENTRANT -DVERSION=\"$(VERSION)\" `mysql_config --cflags`
|
||||
#LDFLAGS = -lm -lpthread `gtk-config --cflags` `gtk-config --libs` -lgthread
|
||||
LDFLAGS = -lwiringPi -lconfig `mysql_config --libs`
|
||||
|
||||
OBJ = main.o dht22.o sendmysql.o configreader.o
|
||||
|
||||
dht22: $(OBJ)
|
||||
$(CC) $(CFLAGS) -o dht22 $(OBJ) $(LDFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -r *.o
|
||||
|
||||
install:
|
||||
sudo cp -r lcdclock /usr/local/bin
|
||||
sudo cp -r playsong.sh /usr/local/bin
|
||||
sudo cp -r settings.cfg /usr/local/bin
|
Reference in New Issue
Block a user