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.
 
 
 
 
 
 

142 lines
2.7 KiB

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