25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

124 lines
2.8 KiB

  1. #
  2. # Makefile:
  3. # wiringPi - Wiring Compatable library for the Raspberry Pi
  4. # https://projects.drogon.net/wiring-pi
  5. #
  6. # Copyright (c) 2012 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. #DEBUG = -g -O0
  25. DEBUG = -O3
  26. CC = gcc
  27. INCLUDE = -I/usr/local/include
  28. CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
  29. LDFLAGS = -L/usr/local/lib
  30. LDLIBS = -lwiringPi
  31. # Should not alter anything below this line
  32. ###############################################################################
  33. SRC = test1.c test2.c speed.c lcd.c wfi.c \
  34. piface.c gertboard.c nes.c \
  35. pwm.c tone.c servo.c \
  36. delayTest.c serialRead.c okLed.c
  37. OBJ = $(SRC:.c=.o)
  38. BINS = $(SRC:.c=)
  39. all:
  40. @cat README.TXT
  41. @echo " $(BINS)" | fmt
  42. @echo ""
  43. test1: test1.o
  44. @echo [link]
  45. @$(CC) -o $@ test1.o $(LDFLAGS) $(LDLIBS)
  46. test2: test2.o
  47. @echo [link]
  48. @$(CC) -o $@ test2.o $(LDFLAGS) $(LDLIBS)
  49. speed: speed.o
  50. @echo [link]
  51. @$(CC) -o $@ speed.o $(LDFLAGS) $(LDLIBS)
  52. lcd: lcd.o
  53. @echo [link]
  54. @$(CC) -o $@ lcd.o $(LDFLAGS) $(LDLIBS)
  55. wfi: wfi.o
  56. @echo [link]
  57. @$(CC) -o $@ wfi.o $(LDFLAGS) $(LDLIBS)
  58. piface: piface.o
  59. @echo [link]
  60. @$(CC) -o $@ piface.o $(LDFLAGS) $(LDLIBS) -lpthread
  61. gertboard: gertboard.o
  62. @echo [link]
  63. @$(CC) -o $@ gertboard.o $(LDFLAGS) $(LDLIBS) -lm
  64. nes: nes.o
  65. @echo [link]
  66. @$(CC) -o $@ nes.o $(LDFLAGS) $(LDLIBS) -lm
  67. pwm: pwm.o
  68. @echo [link]
  69. @$(CC) -o $@ pwm.o $(LDFLAGS) $(LDLIBS) -lm -lpthread
  70. delayTest: delayTest.o
  71. @echo [link]
  72. @$(CC) -o $@ delayTest.o $(LDFLAGS) $(LDLIBS)
  73. serialRead: serialRead.o
  74. @echo [link]
  75. @$(CC) -o $@ serialRead.o $(LDFLAGS) $(LDLIBS)
  76. okLed: okLed.o
  77. @echo [link]
  78. @$(CC) -o $@ okLed.o $(LDFLAGS) $(LDLIBS)
  79. tone: tone.o
  80. @echo [link]
  81. @$(CC) -o $@ tone.o $(LDFLAGS) $(LDLIBS)
  82. servo: servo.o
  83. @echo [link]
  84. @$(CC) -o $@ servo.o $(LDFLAGS) $(LDLIBS)
  85. .c.o:
  86. @echo [CC] $<
  87. @$(CC) -c $(CFLAGS) $< -o $@
  88. clean:
  89. rm -f $(OBJ) *~ core tags $(BINS)
  90. tags: $(SRC)
  91. @echo [ctags]
  92. @ctags $(SRC)
  93. depend:
  94. makedepend -Y $(SRC)
  95. # DO NOT DELETE