Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

81 wiersze
2.0 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 = -O2
  26. CC = gcc
  27. INCLUDE = -I/usr/local/include
  28. CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
  29. LDFLAGS = -L/usr/local/lib
  30. LIBS = -lwiringPi
  31. # May not need to alter anything below this line
  32. ###############################################################################
  33. SRC = gpio.c
  34. OBJ = $(SRC:.c=.o)
  35. all: gpio
  36. gpio: gpio.o
  37. @echo [Link]
  38. @$(CC) -o $@ gpio.o $(LDFLAGS) $(LIBS)
  39. .c.o:
  40. @echo [Compile] $<
  41. @$(CC) -c $(CFLAGS) $< -o $@
  42. .PHONEY: clean
  43. clean:
  44. rm -f $(OBJ) gpio *~ core tags *.bak
  45. .PHONEY: tags
  46. tags: $(SRC)
  47. @echo [ctags]
  48. @ctags $(SRC)
  49. .PHONEY: install
  50. install:
  51. @echo "[Install]"
  52. @cp gpio /usr/local/bin
  53. @chown root.root /usr/local/bin/gpio
  54. @chmod 4755 /usr/local/bin/gpio
  55. @mkdir -p /usr/local/man/man1
  56. @cp gpio.1 /usr/local/man/man1
  57. .PHONEY: uninstall
  58. uninstall:
  59. @echo "[UnInstall]"
  60. rm -f /usr/local/bin/gpio
  61. rm -f /usr/local/man/man1/gpio.1
  62. .PHONEY: depend
  63. depend:
  64. makedepend -Y $(SRC)
  65. # DO NOT DELETE