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.
 
 
 
 
 

106 line
2.9 KiB

  1. #
  2. # Makefile:
  3. # wiringPi - Wiring Compatable library for the Raspberry Pi
  4. #
  5. # Copyright (c) 2012 Gordon Henderson
  6. #################################################################################
  7. # This file is part of wiringPi:
  8. # https://projects.drogon.net/raspberry-pi/wiringpi/
  9. #
  10. # wiringPi is free software: you can redistribute it and/or modify
  11. # it under the terms of the GNU Lesser General Public License as published by
  12. # the Free Software Foundation, either version 3 of the License, or
  13. # (at your option) any later version.
  14. #
  15. # wiringPi is distributed in the hope that it will be useful,
  16. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. # GNU Lesser General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU Lesser General Public License
  21. # along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
  22. #################################################################################
  23. TARGET=libwiringPi.a
  24. #DEBUG = -g -O0
  25. DEBUG = -O3
  26. CC = gcc
  27. INCLUDE = -I.
  28. CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
  29. LIBS =
  30. # Should not alter anything below this line
  31. ###############################################################################
  32. SRC = wiringPi.c wiringPiFace.c wiringSerial.c wiringShift.c \
  33. gertboard.c \
  34. piNes.c \
  35. lcd.c piHiPri.c piThread.c softPwm.c wiringPiSPI.c
  36. OBJ = wiringPi.o wiringPiFace.o wiringSerial.o wiringShift.o \
  37. gertboard.o \
  38. piNes.o \
  39. lcd.o piHiPri.o piThread.o softPwm.o wiringPiSPI.o
  40. all: $(TARGET)
  41. $(TARGET): $(OBJ)
  42. @echo [AR] $(OBJ)
  43. @ar rcs $(TARGET) $(OBJ)
  44. @ranlib $(TARGET)
  45. @size $(TARGET)
  46. .c.o:
  47. @echo [CC] $<
  48. @$(CC) -c $(CFLAGS) $< -o $@
  49. clean:
  50. rm -f $(OBJ) $(TARGET) *~ core tags Makefile.bak
  51. tags: $(SRC)
  52. @echo [ctags]
  53. @ctags $(SRC)
  54. depend:
  55. makedepend -Y $(SRC)
  56. install: $(TARGET)
  57. @echo [install]
  58. install -m 0755 -d /usr/local/lib
  59. install -m 0755 -d /usr/local/include
  60. install -m 0644 wiringPi.h /usr/local/include
  61. install -m 0644 wiringSerial.h /usr/local/include
  62. install -m 0644 wiringShift.h /usr/local/include
  63. install -m 0644 gertboard.h /usr/local/include
  64. install -m 0644 piNes.h /usr/local/include
  65. install -m 0644 softPwm.h /usr/local/include
  66. install -m 0644 lcd.h /usr/local/include
  67. install -m 0644 wiringPiSPI.h /usr/local/include
  68. install -m 0644 libwiringPi.a /usr/local/lib
  69. uninstall:
  70. @echo [uninstall]
  71. rm -f /usr/local/include/lcd.h
  72. rm -f /usr/local/include/lpiNes.h
  73. rm -f /usr/local/include/gertboard.h
  74. rm -f /usr/local/include/wiringShift.h
  75. rm -f /usr/local/include/wiringSerial.h
  76. rm -f /usr/local/include/wiringPi.h
  77. rm -f /usr/local/lib/libwiringPi.a
  78. # DO NOT DELETE
  79. wiringPi.o: wiringPi.h
  80. wiringPiFace.o: wiringPi.h
  81. wiringSerial.o: wiringSerial.h
  82. wiringShift.o: wiringPi.h wiringShift.h
  83. gertboard.o: gertboard.h
  84. piNes.o: wiringPi.h piNes.h
  85. lcd.o: wiringPi.h lcd.h
  86. piHiPri.o: wiringPi.h
  87. piThread.o: wiringPi.h