Advertisement
Mark2020H

Make file for GTK switchboard

Apr 29th, 2020
1,404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.61 KB | None | 0 0
  1. # change application name here (executable output name)
  2. TARGET=switchboard
  3.  
  4. # compiler
  5. CC=gcc
  6. # debug
  7. DEBUG=-g
  8. # optimisation
  9. OPT=-O0
  10. # warnings
  11. WARN=-Wall
  12.  
  13. LIB=-L/usr/local/lib/
  14. INC=-I/usr/local/include -lbcm2835
  15.  
  16.  
  17. PTHREAD=-pthread
  18.  
  19. CCFLAGS=$(DEBUG) $(OPT) $(WARN) $(PTHREAD) -pipe
  20.  
  21. GTKLIB=`pkg-config --cflags --libs gtk+-3.0`
  22.  
  23. # linker
  24. LD=gcc -rdynamic
  25. LDFLAGS=$(PTHREAD) $(GTKLIB)
  26.  
  27. OBJS=main.o
  28.  
  29. all: $(OBJS)
  30.     $(LD) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LIB) $(INC)
  31.    
  32. main.o: src/main.c
  33.     $(CC) -c $(CCFLAGS) $(LIB) src/main.c $(GTKLIB) -o main.o
  34.    
  35. clean:
  36.     rm -f *.o $(TARGET)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement