Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # change application name here (executable output name)
- # ****** Full code and image at https://github.com/markh2016/GTKSingleRPILightSwitch.git *****
- TARGET=Switch
- # compiler
- CC=gcc
- # debug
- DEBUG=-g
- # optimisation
- OPT=-O0
- # warnings
- WARN=-Wall
- LIB=-L/usr/local/lib/
- INC=-I/usr/local/include -lbcm2835
- PTHREAD=-pthread
- CCFLAGS=$(DEBUG) $(OPT) $(WARN) $(PTHREAD) -pipe
- GTKLIB=`pkg-config --cflags --libs gtk+-3.0`
- # linker
- LD=gcc -rdynamic
- LDFLAGS=$(PTHREAD) $(GTKLIB)
- OBJS=main.o
- all: $(OBJS)
- $(LD) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LIB) $(INC)
- main.o: main.c
- $(CC) -c $(CCFLAGS) $(LIB) $(INC) main.c $(GTKLIB) -o main.o
- clean:
- rm -f *.o $(TARGET)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement