Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 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 General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU 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 serial.c wiringShift.c lcd.c
  33. OBJ = wiringPi.o serial.o wiringShift.o lcd.o
  34. all: $(TARGET)
  35. $(TARGET): $(OBJ)
  36. @echo [AR] $(OBJ)
  37. @ar rcs $(TARGET) $(OBJ)
  38. @size $(TARGET)
  39. .c.o:
  40. @echo [CC] $<
  41. @$(CC) -c $(CFLAGS) $< -o $@
  42. clean:
  43. rm -f $(OBJ) $(TARGET) *~ core tags Makefile.bak
  44. tags: $(SRC)
  45. @echo [ctags]
  46. @ctags $(SRC)
  47. depend:
  48. makedepend -Y $(SRC)
  49. install: $(TARGET)
  50. @echo [install]
  51. install -m 0755 -d /usr/local/lib
  52. install -m 0755 -d /usr/local/include
  53. install -m 0644 wiringPi.h /usr/local/include
  54. install -m 0644 serial.h /usr/local/include
  55. install -m 0644 wiringShift.h /usr/local/include
  56. install -m 0644 libwiringPi.a /usr/local/lib
  57. uninstall:
  58. @echo [uninstall]
  59. rm -f /usr/local/include/wiringPi.h
  60. rm -f /usr/local/lib/libwiringPi.a
  61. # DO NOT DELETE
  62. wiringPi.o: wiringPi.h
  63. serial.o: serial.h
  64. wiringShift.o: wiringPi.h wiringShift.h