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.
 
 
 
 
 

38 regels
1.1 KiB

  1. CC = gcc
  2. CFLAGS = -Wall
  3. LDFLAGS =
  4. tests = wiringpi_test1_sysfs wiringpi_test2_sysfs wiringpi_test3_device_wpi wiringpi_test4_device_phys wiringpi_test5_default wiringpi_test6_isr wiringpi_test7_version
  5. all: $(tests)
  6. wiringpi_test1_sysfs:
  7. ${CC} ${CFLAGS} wiringpi_test1_sysfs.c -o wiringpi_test1_sysfs -lwiringPi
  8. wiringpi_test2_sysfs:
  9. ${CC} ${CFLAGS} wiringpi_test2_sysfs.c -o wiringpi_test2_sysfs -lwiringPi
  10. wiringpi_test3_device_wpi:
  11. ${CC} ${CFLAGS} wiringpi_test3_device_wpi.c -o wiringpi_test3_device_wpi -lwiringPi
  12. wiringpi_test4_device_phys:
  13. ${CC} ${CFLAGS} wiringpi_test4_device_phys.c -o wiringpi_test4_device_phys -lwiringPi
  14. wiringpi_test5_default:
  15. ${CC} ${CFLAGS} wiringpi_test5_default.c -o wiringpi_test5_default -lwiringPi
  16. wiringpi_test6_isr:
  17. ${CC} ${CFLAGS} wiringpi_test6_isr.c -o wiringpi_test6_isr -lwiringPi
  18. wiringpi_test7_version:
  19. ${CC} ${CFLAGS} wiringpi_test7_version.c -o wiringpi_test7_version -lwiringPi
  20. test:
  21. for t in $(tests) ; do \
  22. echo === unit test: $${t} === ; \
  23. time ./$${t} ; \
  24. echo ; echo ; \
  25. done
  26. clean:
  27. for t in $(tests) ; do rm -fv $${t} ; done