You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

101 lines
2.6 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 = -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 = test1.c test2.c speed.c lcd.c wfi.c piface.c gertboard.c nes.c delayTest.c softPwm.c
  34. OBJ = test1.o test2.o speed.o lcd.o wfi.o piface.o gertboard.o nes.o delayTest.o softPwm.o
  35. all: test1 test2 speed lcd wfi piface gertboard nes softPwm
  36. test1: test1.o
  37. @echo [link]
  38. $(CC) -o $@ test1.o $(LDFLAGS) $(LIBS)
  39. test2: test2.o
  40. @echo [link]
  41. $(CC) -o $@ test2.o $(LDFLAGS) $(LIBS)
  42. speed: speed.o
  43. @echo [link]
  44. $(CC) -o $@ speed.o $(LDFLAGS) $(LIBS)
  45. lcd: lcd.o
  46. @echo [link]
  47. $(CC) -o $@ lcd.o $(LDFLAGS) $(LIBS)
  48. wfi: wfi.o
  49. @echo [link]
  50. $(CC) -o $@ wfi.o $(LDFLAGS) $(LIBS) -lpthread
  51. piface: piface.o
  52. @echo [link]
  53. $(CC) -o $@ piface.o $(LDFLAGS) $(LIBS) -lpthread
  54. gertboard: gertboard.o
  55. @echo [link]
  56. $(CC) -o $@ gertboard.o $(LDFLAGS) $(LIBS) -lm
  57. nes: nes.o
  58. @echo [link]
  59. $(CC) -o $@ nes.o $(LDFLAGS) $(LIBS) -lm
  60. softPwm: softPwm.o
  61. @echo [link]
  62. $(CC) -o $@ softPwm.o $(LDFLAGS) $(LIBS) -lm -lpthread
  63. delayTest: delayTest.o
  64. @echo [link]
  65. $(CC) -o $@ delayTest.o $(LDFLAGS) $(LIBS)
  66. .c.o:
  67. @echo [CC] $<
  68. @$(CC) -c $(CFLAGS) $< -o $@
  69. clean:
  70. rm -f $(OBJ) *~ core tags test1 test2 speed lcd wfi piface gertboard nes delayTest softPwm
  71. tags: $(SRC)
  72. @echo [ctags]
  73. @ctags $(SRC)
  74. depend:
  75. makedepend -Y $(SRC)
  76. # DO NOT DELETE