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.

Makefile 2.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #
  2. # Makefile:
  3. # wiringPi - A "wiring" library for the Raspberry Pi
  4. # https://projects.drogon.net/wiring-pi
  5. #
  6. # Copyright (c) 2012-2013 Gordon Henderson
  7. #################################################################################
  8. # This file is part of wiringPi:
  9. # A "wiring" library for the Raspberry Pi
  10. #
  11. # wiringPi is free software: you can redistribute it and/or modify
  12. # it under the terms of the GNU Lesser General Public License as published by
  13. # the Free Software Foundation, either version 3 of the License, or
  14. # (at your option) any later version.
  15. #
  16. # wiringPi is distributed in the hope that it will be useful,
  17. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. # GNU Lesser General Public License for more details.
  20. #
  21. # You should have received a copy of the GNU Lesser General Public License
  22. # along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
  23. #################################################################################
  24. ifneq ($V,1)
  25. Q ?= @
  26. endif
  27. #DEBUG = -g -O0
  28. DEBUG = -O3
  29. CC ?= gcc
  30. INCLUDE = -I/usr/local/include
  31. CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)
  32. LDFLAGS = -L/usr/local/lib
  33. LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
  34. ###############################################################################
  35. SRC = blink.c button.c blink-io.c volts.c bright.c
  36. OBJ = $(SRC:.c=.o)
  37. BINS = $(SRC:.c=)
  38. all: $(BINS)
  39. blink: blink.o
  40. $Q echo [link]
  41. $Q $(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)
  42. blink-io: blink-io.o
  43. $Q echo [link]
  44. $Q $(CC) -o $@ blink-io.o $(LDFLAGS) $(LDLIBS)
  45. button: button.o
  46. $Q echo [link]
  47. $Q $(CC) -o $@ button.o $(LDFLAGS) $(LDLIBS)
  48. volts: volts.o
  49. $Q echo [link]
  50. $Q $(CC) -o $@ volts.o $(LDFLAGS) $(LDLIBS)
  51. bright: bright.o
  52. $Q echo [link]
  53. $Q $(CC) -o $@ bright.o $(LDFLAGS) $(LDLIBS)
  54. .c.o:
  55. $Q echo [CC] $<
  56. $Q $(CC) -c $(CFLAGS) $< -o $@
  57. clean:
  58. $Q echo "[Clean]"
  59. $Q rm -f $(OBJ) *~ core tags $(BINS)
  60. tags: $(SRC)
  61. $Q echo [ctags]
  62. $Q ctags $(SRC)
  63. depend:
  64. makedepend -Y $(SRC)
  65. # DO NOT DELETE