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.
 
 
 
 
 
 

105 lines
2.2 KiB

  1. SUBDIRS = helper jtag xsvf svf target server flash pld
  2. lib_LTLIBRARIES = libopenocd.la
  3. bin_PROGRAMS = openocd
  4. if ECOSBOARD
  5. MAINFILE = ecosboard.c
  6. else
  7. MAINFILE = main.c
  8. endif
  9. openocd_SOURCES = $(MAINFILE)
  10. openocd_LDADD = libopenocd.la
  11. libopenocd_la_SOURCES = openocd.c
  12. # set the include path found by configure
  13. AM_CPPFLAGS = \
  14. -I$(top_srcdir)/src \
  15. -I$(top_srcdir)/src/helper \
  16. -I$(top_srcdir)/src/jtag \
  17. -I$(top_srcdir)/src/target \
  18. -I$(top_srcdir)/src/xsvf \
  19. -I$(top_srcdir)/src/svf \
  20. -I$(top_srcdir)/src/server \
  21. -I$(top_srcdir)/src/flash \
  22. -I$(top_srcdir)/src/pld
  23. libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\"
  24. # banner output includes RELSTR appended to $VERSION from the configure script
  25. # guess-rev.sh returns either a repository version ID or "-snapshot"
  26. if RELEASE
  27. libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
  28. else
  29. libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
  30. endif
  31. # add default CPPFLAGS
  32. libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
  33. # the library search path.
  34. libopenocd_la_LDFLAGS = $(all_libraries)
  35. if IS_MINGW
  36. MINGWLDADD = -lwsock32
  37. else
  38. MINGWLDADD =
  39. endif
  40. if FT2232_LIBFTDI
  41. FTDI2232LIB = -lftdi -lusb
  42. else
  43. if PRESTO_LIBFTDI
  44. FTDI2232LIB = -lftdi -lusb
  45. else
  46. FTDI2232LIB =
  47. endif
  48. endif
  49. if USBPROG
  50. LIBUSB = -lusb
  51. else
  52. if JLINK
  53. LIBUSB = -lusb
  54. else
  55. if RLINK
  56. LIBUSB = -lusb
  57. else
  58. if VSLLINK
  59. LIBUSB = -lusb
  60. else
  61. LIBUSB =
  62. endif
  63. endif
  64. endif
  65. endif
  66. libopenocd_la_LIBADD = \
  67. $(top_builddir)/src/xsvf/libxsvf.la \
  68. $(top_builddir)/src/svf/libsvf.la \
  69. $(top_builddir)/src/pld/libpld.la \
  70. $(top_builddir)/src/jtag/libjtag.la \
  71. $(top_builddir)/src/flash/libflash.la \
  72. $(top_builddir)/src/target/libtarget.la \
  73. $(top_builddir)/src/server/libserver.la \
  74. $(top_builddir)/src/helper/libhelper.la \
  75. $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
  76. if HTTPD
  77. libopenocd_la_LIBADD += -lmicrohttpd
  78. endif
  79. MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
  80. # The "quick" target builds executables & reinstalls the executables
  81. # Primary use: developer types to quicken the edit/compile/debug
  82. # cycle. by not requiring a "full build and full install". Note the
  83. # assumption is: You are only rebuilding the EXE.... and everything
  84. # else is/was previously installed.
  85. #
  86. # use at your own risk
  87. quick: all install-binPROGRAMS