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.
 
 
 
 
 
 

117 lines
2.7 KiB

  1. include $(top_srcdir)/common.mk
  2. SUBDIRS = \
  3. jtag \
  4. helper \
  5. target \
  6. transport \
  7. flash \
  8. svf \
  9. xsvf \
  10. pld \
  11. server \
  12. rtos
  13. noinst_LTLIBRARIES = libopenocd.la
  14. bin_PROGRAMS = openocd
  15. MAINFILE = main.c
  16. openocd_SOURCES = $(MAINFILE)
  17. openocd_LDADD = libopenocd.la
  18. if INTERNAL_JIMTCL
  19. openocd_LDADD += $(top_builddir)/jimtcl/libjim.a
  20. else
  21. openocd_LDADD += -ljim
  22. endif
  23. if ULINK
  24. openocd_LDADD += -lm
  25. endif
  26. libopenocd_la_SOURCES = \
  27. hello.c \
  28. openocd.c
  29. noinst_HEADERS = \
  30. hello.h \
  31. openocd.h
  32. libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\"
  33. # banner output includes RELSTR appended to $VERSION from the configure script
  34. # guess-rev.sh returns either a repository version ID or "-snapshot"
  35. if RELEASE
  36. libopenocd_la_CPPFLAGS += -DRELSTR=\"\"
  37. libopenocd_la_CPPFLAGS += -DGITVERSION=\"\"
  38. else
  39. libopenocd_la_CPPFLAGS += -DRELSTR=\"`$(top_srcdir)/guess-rev.sh $(top_srcdir)`\"
  40. libopenocd_la_CPPFLAGS += -DGITVERSION=\"`cd $(top_srcdir) && git describe`\"
  41. endif
  42. # add default CPPFLAGS
  43. libopenocd_la_CPPFLAGS += $(AM_CPPFLAGS) $(CPPFLAGS)
  44. # the library search path.
  45. libopenocd_la_LDFLAGS = $(all_libraries)
  46. if IS_MINGW
  47. MINGWLDADD = -lws2_32
  48. else
  49. MINGWLDADD =
  50. endif
  51. libopenocd_la_LIBADD = \
  52. $(top_builddir)/src/xsvf/libxsvf.la \
  53. $(top_builddir)/src/svf/libsvf.la \
  54. $(top_builddir)/src/pld/libpld.la \
  55. $(top_builddir)/src/jtag/libjtag.la \
  56. $(top_builddir)/src/transport/libtransport.la \
  57. $(top_builddir)/src/flash/libflash.la \
  58. $(top_builddir)/src/target/libtarget.la \
  59. $(top_builddir)/src/server/libserver.la \
  60. $(top_builddir)/src/rtos/librtos.la \
  61. $(top_builddir)/src/helper/libhelper.la \
  62. $(LIBFTDI_LIBS) $(MINGWLDADD) \
  63. $(HIDAPI_LIBS) $(LIBUSB0_LIBS) $(LIBUSB1_LIBS)
  64. STARTUP_TCL_SRCS = \
  65. $(srcdir)/helper/startup.tcl \
  66. $(srcdir)/jtag/startup.tcl \
  67. $(srcdir)/target/startup.tcl \
  68. $(srcdir)/flash/startup.tcl \
  69. $(srcdir)/server/startup.tcl
  70. EXTRA_DIST = $(STARTUP_TCL_SRCS)
  71. BUILT_SOURCES = startup_tcl.inc
  72. startup.tcl: $(STARTUP_TCL_SRCS)
  73. cat $^ > $@
  74. BIN2C = $(top_srcdir)/src/helper/bin2char.sh
  75. # Convert .tcl to c-array
  76. startup_tcl.inc: startup.tcl $(BIN2C)
  77. $(BIN2C) < $< > $@ || { rm -f $@; false; }
  78. # add generated files to make clean list
  79. CLEANFILES = startup.tcl startup_tcl.inc
  80. # we do not want generated file in the dist
  81. dist-hook:
  82. rm -f $(distdir)/startup_tcl.inc
  83. MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
  84. # The "quick" target builds executables & reinstalls the executables
  85. # Primary use: developer types to quicken the edit/compile/debug
  86. # cycle. by not requiring a "full build and full install". Note the
  87. # assumption is: You are only rebuilding the EXE.... and everything
  88. # else is/was previously installed.
  89. #
  90. # use at your own risk
  91. quick: all install-binPROGRAMS