Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 lcd.c piHiPri.c piThread.c
  33. OBJ = wiringPi.o wiringPiFace.o wiringSerial.o wiringShift.o lcd.o piHiPri.o piThread.o
  34. all: $(TARGET)
  35. $(TARGET): $(OBJ)
  36. @echo [AR] $(OBJ)
  37. @ar rcs $(TARGET) $(OBJ)
  38. @ranlib $(TARGET)
  39. @size $(TARGET)
  40. .c.o:
  41. @echo [CC] $<
  42. @$(CC) -c $(CFLAGS) $< -o $@
  43. clean:
  44. rm -f $(OBJ) $(TARGET) *~ core tags Makefile.bak
  45. tags: $(SRC)
  46. @echo [ctags]
  47. @ctags $(SRC)
  48. depend:
  49. makedepend -Y $(SRC)
  50. install: $(TARGET)
  51. @echo [install]
  52. install -m 0755 -d /usr/local/lib
  53. install -m 0755 -d /usr/local/include
  54. install -m 0644 wiringPi.h /usr/local/include
  55. install -m 0644 wiringSerial.h /usr/local/include
  56. install -m 0644 wiringShift.h /usr/local/include
  57. install -m 0644 lcd.h /usr/local/include
  58. install -m 0644 libwiringPi.a /usr/local/lib
  59. uninstall:
  60. @echo [uninstall]
  61. rm -f /usr/local/include/lcd.h
  62. rm -f /usr/local/include/wiringShift.h
  63. rm -f /usr/local/include/wiringPi.h
  64. rm -f /usr/local/lib/libwiringPi.a
  65. # DO NOT DELETE
  66. wiringPi.o: wiringPi.h
  67. wiringPiFace.o: wiringPi.h
  68. wiringSerial.o: wiringSerial.h
  69. wiringShift.o: wiringPi.h wiringShift.h
  70. lcd.o: wiringPi.h lcd.h
  71. piHiPri.o: wiringPi.h
  72. piThread.o: wiringPi.h