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.
 
 
 
 
 
 

138 lines
2.6 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 PRESTO_LIBFTDI
  51. FTDI2232LIB = -lftdi -lusb
  52. else
  53. FTDI2232LIB =
  54. endif
  55. endif
  56. if USBPROG
  57. LIBUSB = -lusb
  58. else
  59. if JLINK
  60. LIBUSB = -lusb
  61. else
  62. if RLINK
  63. LIBUSB = -lusb
  64. else
  65. if VSLLINK
  66. LIBUSB = -lusb
  67. else
  68. LIBUSB =
  69. endif
  70. endif
  71. endif
  72. endif
  73. libopenocd_la_LIBADD = \
  74. $(top_builddir)/src/xsvf/libxsvf.la \
  75. $(top_builddir)/src/svf/libsvf.la \
  76. $(top_builddir)/src/pld/libpld.la \
  77. $(top_builddir)/src/jtag/libjtag.la \
  78. $(top_builddir)/src/flash/libflash.la \
  79. $(top_builddir)/src/target/libtarget.la \
  80. $(top_builddir)/src/server/libserver.la \
  81. $(top_builddir)/src/helper/libhelper.la \
  82. $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB)
  83. if HTTPD
  84. libopenocd_la_LIBADD += -lmicrohttpd
  85. endif
  86. STARTUP_TCL_SRCS = \
  87. $(srcdir)/helper/startup.tcl \
  88. $(srcdir)/jtag/startup.tcl \
  89. $(srcdir)/target/startup.tcl \
  90. $(srcdir)/flash/startup.tcl \
  91. $(srcdir)/server/startup.tcl
  92. EXTRA_DIST = $(STARTUP_TCL_SRCS)
  93. BUILT_SOURCES = startup.tcl
  94. startup.tcl: $(STARTUP_TCL_SRCS)
  95. cat $^ > $@
  96. BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD)
  97. # Convert .tcl to cfile
  98. startup_tcl.c: startup.tcl $(BIN2C)
  99. $(BIN2C) openocd_startup_tcl < $< > $@ || rm -f $@
  100. # add startup_tcl.c to make clean list
  101. CLEANFILES = startup.tcl startup_tcl.c
  102. MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
  103. # The "quick" target builds executables & reinstalls the executables
  104. # Primary use: developer types to quicken the edit/compile/debug
  105. # cycle. by not requiring a "full build and full install". Note the
  106. # assumption is: You are only rebuilding the EXE.... and everything
  107. # else is/was previously installed.
  108. #
  109. # use at your own risk
  110. quick: all install-binPROGRAMS