You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

56 lines
1010 B

  1. #
  2. # Makefile:
  3. # Gertboard - Examples using wiringPi
  4. #
  5. # Copyright (c) 2013 Gordon Henderson
  6. #################################################################################
  7. ifneq ($V,1)
  8. Q ?= @
  9. endif
  10. #DEBUG = -g -O0
  11. DEBUG = -O3
  12. CC ?= gcc
  13. INCLUDE = -I/usr/local/include
  14. CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)
  15. LDFLAGS = -L/usr/local/lib
  16. LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
  17. # Should not alter anything below this line
  18. ###############################################################################
  19. SRC = buttons.c 7segments.c
  20. OBJ = $(SRC:.c=.o)
  21. BINS = $(SRC:.c=)
  22. all: $(BINS)
  23. buttons: buttons.o
  24. $Q echo [link]
  25. $Q $(CC) -o $@ buttons.o $(LDFLAGS) $(LDLIBS)
  26. 7segments: 7segments.o
  27. $Q echo [link]
  28. $Q $(CC) -o $@ 7segments.o $(LDFLAGS) $(LDLIBS)
  29. .c.o:
  30. $Q echo [CC] $<
  31. $Q $(CC) -c $(CFLAGS) $< -o $@
  32. clean:
  33. $Q echo [Clean]
  34. $Q rm -f $(OBJ) *~ core tags $(BINS)
  35. tags: $(SRC)
  36. $Q echo [ctags]
  37. $Q ctags $(SRC)
  38. depend:
  39. makedepend -Y $(SRC)
  40. # DO NOT DELETE