Added example, added makefile

This commit is contained in:
2016-09-04 20:58:29 +02:00
parent 9b87fcc68c
commit 84d9a3d3a7
3 changed files with 42 additions and 6 deletions

20
makefile Normal file
View File

@@ -0,0 +1,20 @@
#Infos: http://www.ijon.de/comp/tutorials/makefile.html
VERSION = 1.0
CC = /usr/bin/gcc
CFLAGS = -Wall -g -D_REENTRANT -DVERSION=\"$(VERSION)\"
#LDFLAGS = -lm -lpthread `gtk-config --cflags` `gtk-config --libs` -lgthread
LDFLAGS = -lwiringPi -lm
OBJ = gy521example.o libgy521.o
waterpicore: $(OBJ)
$(CC) $(CFLAGS) -o gy521example $(OBJ) $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c $<
.PHONY: clean
clean:
rm -r *.o