Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. LIBS = -lwiringPi
  31. # Should not alter anything below this line
  32. ###############################################################################
  33. SRC = gpio.c
  34. OBJ = gpio.o
  35. all: gpio
  36. gpio: gpio.o
  37. @echo [LD]
  38. @$(CC) -o $@ gpio.o $(LDFLAGS) $(LIBS)
  39. .c.o:
  40. @echo [CC] $<
  41. @$(CC) -c $(CFLAGS) $< -o $@
  42. clean:
  43. rm -f $(OBJ) gpio *~ core tags
  44. tags: $(SRC)
  45. @echo [ctags]
  46. @ctags $(SRC)
  47. depend:
  48. makedepend -Y $(SRC)
  49. install:
  50. cp gpio /usr/local/bin
  51. chown root.root /usr/local/bin/gpio
  52. chmod 4755 /usr/local/bin/gpio
  53. mkdir -p /usr/local/man/man1
  54. cp gpio.1 /usr/local/man/man1
  55. uninstall:
  56. rm -f /usr/local/bin/gpio
  57. rm -f /usr/local/man/man1/gpio.1
  58. # DO NOT DELETE