No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

123 líneas
3.5 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. DYN_VERS_MAJ=1
  24. DYN_VERS_MIN=0
  25. STATIC=libwiringPi.a
  26. DYNAMIC=libwiringPi.so.$(DYN_VERS_MAJ).$(DYN_VERS_MIN)
  27. #DEBUG = -g -O0
  28. DEBUG = -O2
  29. CC = gcc
  30. INCLUDE = -I.
  31. CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -fPIC
  32. LIBS =
  33. # Should not alter anything below this line
  34. ###############################################################################
  35. SRC = wiringPi.c wiringPiFace.c wiringSerial.c wiringShift.c \
  36. gertboard.c \
  37. piNes.c \
  38. lcd.c piHiPri.c piThread.c softPwm.c wiringPiSPI.c
  39. OBJ = wiringPi.o wiringPiFace.o wiringSerial.o wiringShift.o \
  40. gertboard.o \
  41. piNes.o \
  42. lcd.o piHiPri.o piThread.o softPwm.o wiringPiSPI.o
  43. all: $(STATIC) $(DYNAMIC)
  44. $(STATIC): $(OBJ)
  45. @echo [STATIC]
  46. @ar rcs $(STATIC) $(OBJ)
  47. @ranlib $(STATIC)
  48. # @size $(STATIC)
  49. $(DYNAMIC): $(OBJ)
  50. @echo [DYNAMIC]
  51. @gcc -shared -Wl,-soname,libwiringPi.so.1 -o libwiringPi.so.1.0 -lpthread $(OBJ)
  52. .c.o:
  53. @echo [CC] $<
  54. @$(CC) -c $(CFLAGS) $< -o $@
  55. clean:
  56. rm -f $(OBJ) *~ core tags Makefile.bak libwiringPi.*
  57. tags: $(SRC)
  58. @echo [ctags]
  59. @ctags $(SRC)
  60. depend:
  61. makedepend -Y $(SRC)
  62. install: $(TARGET)
  63. @echo [install]
  64. @install -m 0755 -d /usr/local/lib
  65. @install -m 0755 -d /usr/local/include
  66. @install -m 0644 wiringPi.h /usr/local/include
  67. @install -m 0644 wiringSerial.h /usr/local/include
  68. @install -m 0644 wiringShift.h /usr/local/include
  69. @install -m 0644 gertboard.h /usr/local/include
  70. @install -m 0644 piNes.h /usr/local/include
  71. @install -m 0644 softPwm.h /usr/local/include
  72. @install -m 0644 lcd.h /usr/local/include
  73. @install -m 0644 wiringPiSPI.h /usr/local/include
  74. @install -m 0644 libwiringPi.a /usr/local/lib
  75. @install -m 0755 libwiringPi.so.1.0 /usr/local/lib
  76. @ln -sf /usr/local/lib/libwiringPi.so.1.0 /usr/local/lib/libwiringPi.so
  77. @ln -sf /usr/local/lib/libwiringPi.so.1.0 /usr/local/lib/libwiringPi.so.1
  78. @ldconfig
  79. uninstall:
  80. @echo [uninstall]
  81. @rm -f /usr/local/include/wiringPi.h
  82. @rm -f /usr/local/include/wiringSerial.h
  83. @rm -f /usr/local/include/wiringShift.h
  84. @rm -f /usr/local/include/gertboard.h
  85. @rm -f /usr/local/include/piNes.h
  86. @rm -f /usr/local/include/softPwm.h
  87. @rm -f /usr/local/include/lcd.h
  88. @rm -f /usr/local/include/wiringPiSPI.h
  89. @rm -f /usr/local/lib/libwiringPi.*
  90. @ldconfig
  91. # DO NOT DELETE
  92. wiringPi.o: wiringPi.h
  93. wiringPiFace.o: wiringPi.h
  94. wiringSerial.o: wiringSerial.h
  95. wiringShift.o: wiringPi.h wiringShift.h
  96. gertboard.o: wiringPiSPI.h gertboard.h
  97. piNes.o: wiringPi.h piNes.h
  98. lcd.o: wiringPi.h lcd.h
  99. piHiPri.o: wiringPi.h
  100. piThread.o: wiringPi.h
  101. softPwm.o: wiringPi.h softPwm.h
  102. wiringPiSPI.o: wiringPiSPI.h