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.
 
 
 
 
 
 

99 lines
2.5 KiB

  1. # -*- mode: makefile -*-
  2. #
  3. default: _complain_
  4. include ./local.uses
  5. %: _complain_
  6. _complain_:
  7. @echo ""
  8. @echo " Try the target: cygwin.buildtest or linux.buildtest "
  9. @echo ""
  10. remove.install:
  11. rm -rf ${INSTALL_DIR}
  12. .PHONY: remove.install
  13. cygwin.buildtest:
  14. ${MAKE} -f Makefile.ftd2xx clean all
  15. ${MAKE} -f Makefile.openocd cygwin.easy.permutations
  16. ${MAKE} -f Makefile.openocd mingw32.easy.permutations
  17. ${MAKE} -f Makefile.libftdi all
  18. ${MAKE} -f Makefile.openocd cygwin.libftdi
  19. linux.buildtest:
  20. ${MAKE} linux.easy.buildtest
  21. ${MAKE} linux.ftd2xx_installed
  22. ${MAKE} linux.ft2232_libftdi
  23. @echo ""
  24. @echo ""
  25. @echo "========================================"
  26. @echo " Linux Build Tests Complete "
  27. @echo "========================================"
  28. @echo ""
  29. @echo ""
  30. linux.easy.buildtest:
  31. @test -d openocd || (echo "Where the source to openocd?" && exit 1)
  32. ${MAKE} -f Makefile.openocd bootstrap
  33. ${MAKE} -f Makefile.ftd2xx all
  34. ${MAKE} -f Makefile.openocd linux.easy.permutations
  35. linux.ftd2xx_installed:
  36. ${MAKE} remove.install
  37. ${MAKE} linux.ftd2xx_installed.setup
  38. ${MAKE} -f Makefile.openocd $@
  39. linux.ft2232_libftdi:
  40. ${MAKE} remove.install
  41. ${MAKE} -f Makefile.libusb all
  42. ${MAKE} -f Makefile.confuse all
  43. ${MAKE} -f Makefile.libftdi all
  44. ${MAKE} -f Makefile.openocd $@
  45. # This target is used to "install" files from
  46. # the FTDICHIP.COM tar.gz unpack directory
  47. # into "a proper place" - where they should be found.
  48. linux.ftd2xx_installed.setup:
  49. mkdir -p ${INSTALL_DIR}/include
  50. mkdir -p ${EXEC_PREFIX}/lib
  51. @#
  52. @# Sanity check - make sure the .H file is findable
  53. @#
  54. @f=$(FTD2XX_LINUX_DIR)/ftd2xx.h && \
  55. test -f $$f || (echo "Error: $$f not found" ; exit 1)
  56. @#
  57. @# Header files are simple... just copy them.
  58. @#
  59. cp $(FTD2XX_LINUX_DIR)/ftd2xx.h $(PREFIX)/include/.
  60. cp $(FTD2XX_LINUX_DIR)/WinTypes.h $(PREFIX)/include/.
  61. @#
  62. @# .SO files are harder.
  63. @# (1) copy them, (2) make links
  64. @#
  65. cp $(FTD2XX_LINUX_DIR)/libftd2xx.so.$(FTD2XX_LINUX_VERSION) $(EXEC_PREFIX)/lib/.
  66. cd $(EXEC_PREFIX)/lib && rm -f libftd2xx.so.0
  67. cd $(EXEC_PREFIX)/lib && ln -s libftd2xx.so.$(FTD2XX_LINUX_VERSION) libftd2xx.so.0
  68. cd $(EXEC_PREFIX)/lib && rm -f libftd2xx.so
  69. cd $(EXEC_PREFIX)/lib && ln -s libftd2xx.so.$(FTD2XX_LINUX_VERSION) libftd2xx.so
  70. all.download:
  71. mkdir -p ${VIRGINS}
  72. ${MAKE} -f Makefile.confuse download
  73. ${MAKE} -f Makefile.libftdi download
  74. ${MAKE} -f Makefile.ftd2xx download
  75. ${MAKE} -f Makefile.libusb download
  76. .PHONY: linux.buildtest \
  77. linux.easy.buildtest \
  78. linux.ftd2xx_installed \
  79. linux.ft22232_libftdi \
  80. linux.ftd2xx_installed.setup