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.
 
 
 
 
 
 

137 lines
2.8 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 = \
  12. hello.c \
  13. openocd.c \
  14. startup_tcl.c
  15. noinst_HEADERS = \
  16. hello.h \
  17. openocd.h
  18. # set the include path found by configure
  19. AM_CPPFLAGS = \
  20. -I$(top_srcdir)/src \
  21. -I$(top_srcdir)/src/helper \
  22. -I$(top_srcdir)/src/jtag \
  23. -I$(top_srcdir)/src/target \
  24. -I$(top_srcdir)/src/xsvf \
  25. -I$(top_srcdir)/src/svf \
  26. -I$(top_srcdir)/src/server \
  27. -I$(top_srcdir)/src/flash \
  28. -I$(top_srcdir)/src/pld
  29. libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\"
  30. # banner output includes RELSTR appended to $VERSION from the configure script
  31. # guess-rev.sh returns either a repository version ID or "-snapshot"
  32. if RELEASE
  33. libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
  34. else
  35. libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
  36. endif
  37. # add default CPPFLAGS
  38. libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
  39. # the library search path.
  40. libopenocd_la_LDFLAGS = $(all_libraries)
  41. if IS_MINGW
  42. MINGWLDADD = -lws2_32
  43. else
  44. MINGWLDADD =
  45. endif
  46. if FT2232_LIBFTDI
  47. FTDI2232LIB = -lftdi -lusb
  48. else
  49. if PRESTO_LIBFTDI
  50. FTDI2232LIB = -lftdi -lusb
  51. else
  52. FTDI2232LIB =
  53. endif
  54. endif
  55. if USBPROG
  56. LIBUSB = -lusb
  57. else
  58. if JLINK
  59. LIBUSB = -lusb
  60. else
  61. if RLINK
  62. LIBUSB = -lusb
  63. else
  64. if VSLLINK
  65. LIBUSB = -lusb
  66. else
  67. LIBUSB =
  68. endif
  69. endif
  70. endif
  71. endif
  72. libopenocd_la_LIBADD = \
  73. $(top_builddir)/src/xsvf/libxsvf.la \
  74. $(top_builddir)/src/svf/libsvf.la \
  75. $(top_builddir)/src/pld/libpld.la \
  76. $(top_builddir)/src/jtag/libjtag.la \
  77. $(top_builddir)/src/flash/libflash.la \
  78. $(top_builddir)/src/target/libtarget.la \
  79. $(top_builddir)/src/server/libserver.la \
  80. $(top_builddir)/src/helper/libhelper.la \
  81. $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
  82. if HTTPD
  83. libopenocd_la_LIBADD += -lmicrohttpd
  84. endif
  85. STARTUP_TCL_SRCS = \
  86. $(srcdir)/helper/startup.tcl \
  87. $(srcdir)/jtag/startup.tcl \
  88. $(srcdir)/target/startup.tcl \
  89. $(srcdir)/flash/startup.tcl \
  90. $(srcdir)/server/startup.tcl
  91. EXTRA_DIST = $(STARTUP_TCL_SRCS)
  92. BUILT_SOURCES = startup.tcl
  93. startup.tcl: $(STARTUP_TCL_SRCS)
  94. cat $^ > $@
  95. BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD)
  96. # Convert .tcl to cfile
  97. startup_tcl.c: startup.tcl $(BIN2C)
  98. $(BIN2C) openocd_startup_tcl < $< > $@ || rm -f $@
  99. # add startup_tcl.c to make clean list
  100. CLEANFILES = startup.tcl startup_tcl.c
  101. MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
  102. # The "quick" target builds executables & reinstalls the executables
  103. # Primary use: developer types to quicken the edit/compile/debug
  104. # cycle. by not requiring a "full build and full install". Note the
  105. # assumption is: You are only rebuilding the EXE.... and everything
  106. # else is/was previously installed.
  107. #
  108. # use at your own risk
  109. quick: all install-binPROGRAMS