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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. #
  2. # Makefile:
  3. # wiringPi - A "wiring" library for the Raspberry Pi
  4. # https://github.com/wiringPi/wiringPi
  5. #
  6. # Copyright (c) 2012-2015 Gordon Henderson
  7. #################################################################################
  8. # This file is part of wiringPi:
  9. # Wiring Compatable 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 -lcrypt -lrt
  34. # Should not alter anything below this line
  35. ###############################################################################
  36. SRC = blink.c blink8.c blink12.c \
  37. blink12drcs.c \
  38. pwm.c \
  39. speed.c wfi.c isr.c isr-osc.c \
  40. lcd.c lcd-adafruit.c clock.c \
  41. nes.c \
  42. softPwm.c softTone.c \
  43. delayTest.c serialRead.c serialTest.c okLed.c ds1302.c \
  44. lowPower.c \
  45. max31855.c \
  46. rht03.c \
  47. servo.c \
  48. isr1.c \
  49. test1.c \
  50. test2.c
  51. OBJ = $(SRC:.c=.o)
  52. BINS = $(SRC:.c=)
  53. all:
  54. $Q cat README.TXT
  55. $Q echo " $(BINS)" | fmt
  56. $Q echo ""
  57. really-all: $(BINS)
  58. blink: blink.o
  59. $Q echo [link]
  60. $Q $(CC) -o $@ blink.o $(LDFLAGS) $(LDLIBS)
  61. blink8: blink8.o
  62. $Q echo [link]
  63. $Q $(CC) -o $@ blink8.o $(LDFLAGS) $(LDLIBS)
  64. blink12drcs: blink12drcs.o
  65. $Q echo [link]
  66. $Q $(CC) -o $@ blink12drcs.o $(LDFLAGS) $(LDLIBS)
  67. blink12: blink12.o
  68. $Q echo [link]
  69. $Q $(CC) -o $@ blink12.o $(LDFLAGS) $(LDLIBS)
  70. speed: speed.o
  71. $Q echo [link]
  72. $Q $(CC) -o $@ speed.o $(LDFLAGS) $(LDLIBS)
  73. lcd: lcd.o
  74. $Q echo [link]
  75. $Q $(CC) -o $@ lcd.o $(LDFLAGS) $(LDLIBS)
  76. lcd-adafruit: lcd-adafruit.o
  77. $Q echo [link]
  78. $Q $(CC) -o $@ lcd-adafruit.o $(LDFLAGS) $(LDLIBS)
  79. clock: clock.o
  80. $Q echo [link]
  81. $Q $(CC) -o $@ clock.o $(LDFLAGS) $(LDLIBS)
  82. wfi: wfi.o
  83. $Q echo [link]
  84. $Q $(CC) -o $@ wfi.o $(LDFLAGS) $(LDLIBS)
  85. isr: isr.o
  86. $Q echo [link]
  87. $Q $(CC) -o $@ isr.o $(LDFLAGS) $(LDLIBS)
  88. isr-osc: isr-osc.o
  89. $Q echo [link]
  90. $Q $(CC) -o $@ isr-osc.o $(LDFLAGS) $(LDLIBS)
  91. nes: nes.o
  92. $Q echo [link]
  93. $Q $(CC) -o $@ nes.o $(LDFLAGS) $(LDLIBS)
  94. rht03: rht03.o
  95. $Q echo [link]
  96. $Q $(CC) -o $@ rht03.o $(LDFLAGS) $(LDLIBS)
  97. pwm: pwm.o
  98. $Q echo [link]
  99. $Q $(CC) -o $@ pwm.o $(LDFLAGS) $(LDLIBS)
  100. softPwm: softPwm.o
  101. $Q echo [link]
  102. $Q $(CC) -o $@ softPwm.o $(LDFLAGS) $(LDLIBS)
  103. softTone: softTone.o
  104. $Q echo [link]
  105. $Q $(CC) -o $@ softTone.o $(LDFLAGS) $(LDLIBS)
  106. delayTest: delayTest.o
  107. $Q echo [link]
  108. $Q $(CC) -o $@ delayTest.o $(LDFLAGS) $(LDLIBS)
  109. serialRead: serialRead.o
  110. $Q echo [link]
  111. $Q $(CC) -o $@ serialRead.o $(LDFLAGS) $(LDLIBS)
  112. serialTest: serialTest.o
  113. $Q echo [link]
  114. $Q $(CC) -o $@ serialTest.o $(LDFLAGS) $(LDLIBS)
  115. okLed: okLed.o
  116. $Q echo [link]
  117. $Q $(CC) -o $@ okLed.o $(LDFLAGS) $(LDLIBS)
  118. tone: tone.o
  119. $Q echo [link]
  120. $Q $(CC) -o $@ tone.o $(LDFLAGS) $(LDLIBS)
  121. servo: servo.o softServo.o
  122. $Q echo [link]
  123. $Q $(CC) -o $@ servo.o softServo.o $(LDFLAGS) $(LDLIBS)
  124. softServo.o: ../wiringPi/softServo.c ../wiringPi/softServo.h
  125. $Q echo [softServo]
  126. $Q $(CC) -c $(CFLAGS) $< -o softServo.o
  127. ds1302: ds1302.o
  128. $Q echo [link]
  129. $Q $(CC) -o $@ ds1302.o $(LDFLAGS) $(LDLIBS)
  130. max31855: max31855.o
  131. $Q echo [link]
  132. $Q $(CC) -o $@ max31855.o $(LDFLAGS) $(LDLIBS)
  133. .c.o:
  134. $Q echo [CC] $<
  135. $Q $(CC) -c $(CFLAGS) $< -o $@
  136. clean:
  137. $Q echo "[Clean]"
  138. $Q rm -f $(OBJ) *~ core tags $(BINS)
  139. echo:
  140. $Q echo "[BINS] $(BINS)"
  141. tags: $(SRC)
  142. $Q echo [ctags]
  143. $Q ctags $(SRC)
  144. depend:
  145. makedepend -Y $(SRC)
  146. # DO NOT DELETE