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.
 
 
 
 
 
 

103 lines
2.2 KiB

  1. bin_PROGRAMS = openocd
  2. if ECOSBOARD
  3. MAINFILE = ecosboard.c
  4. else
  5. MAINFILE = main.c jim.c
  6. endif
  7. openocd_SOURCES = $(MAINFILE) openocd.c
  8. # set the include path found by configure
  9. INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/helper \
  10. -I$(top_srcdir)/src/jtag -I$(top_srcdir)/src/target -I$(top_srcdir)/src/xsvf -I$(top_srcdir)/src/server \
  11. -I$(top_srcdir)/src/flash -I$(top_srcdir)/src/pld $(all_includes)
  12. # pass path to prefix path
  13. openocd_CPPFLAGS = \
  14. -DPKGLIBDIR=\"$(pkglibdir)\" \
  15. -DPKGBLDDATE=\"`date +%F-%R`\" \
  16. -DPKGBLDREV=\"`$(top_srcdir)/guess-rev.sh`\" \
  17. @CPPFLAGS@
  18. # the library search path.
  19. openocd_LDFLAGS = $(all_libraries)
  20. SUBDIRS = helper jtag xsvf target server flash pld
  21. if IS_MINGW
  22. MINGWLDADD = -lwsock32
  23. else
  24. MINGWLDADD =
  25. endif
  26. if FT2232_LIBFTDI
  27. FTDI2232LIB = -lftdi -lusb
  28. else
  29. if PRESTO_LIBFTDI
  30. FTDI2232LIB = -lftdi -lusb
  31. else
  32. FTDI2232LIB =
  33. endif
  34. endif
  35. if USBPROG
  36. LIBUSB = -lusb
  37. else
  38. if JLINK
  39. LIBUSB = -lusb
  40. else
  41. LIBUSB =
  42. endif
  43. endif
  44. if IS_WIN32
  45. if FTD2XXDIR
  46. FTD2XXLDADD = @WITH_FTD2XX@/FTD2XX.lib
  47. else
  48. FTD2XXLDADD = -lftd2xx
  49. endif
  50. else
  51. FTD2XXLDADD = -lftd2xx
  52. endif
  53. if FT2232_FTD2XX
  54. FTD2XXLIB = $(FTD2XXLDADD)
  55. else
  56. if PRESTO_FTD2XX
  57. FTD2XXLIB = $(FTD2XXLDADD)
  58. else
  59. FTD2XXLIB =
  60. endif
  61. endif
  62. openocd_LDADD = $(top_builddir)/src/startup.o $(top_builddir)/src/xsvf/libxsvf.a \
  63. $(top_builddir)/src/target/libtarget.a $(top_builddir)/src/jtag/libjtag.a \
  64. $(top_builddir)/src/helper/libhelper.a \
  65. $(top_builddir)/src/server/libserver.a $(top_builddir)/src/helper/libhelper.a \
  66. $(top_builddir)/src/flash/libflash.a $(top_builddir)/src/target/libtarget.a \
  67. $(top_builddir)/src/pld/libpld.a \
  68. $(FTDI2232LIB) $(FTD2XXLIB) $(MINGWLDADD) $(LIBUSB)
  69. nobase_dist_pkglib_DATA = \
  70. tcl/bitsbytes.tcl \
  71. tcl/chip/atmel/at91/aic.tcl \
  72. tcl/chip/atmel/at91/at91sam7x128.tcl \
  73. tcl/chip/atmel/at91/at91sam7x256.tcl \
  74. tcl/chip/atmel/at91/pmc.tcl \
  75. tcl/chip/atmel/at91/rtt.tcl \
  76. tcl/chip/atmel/at91/usarts.tcl \
  77. tcl/cpu/arm/arm7tdmi.tcl \
  78. tcl/cpu/arm/arm920.tcl \
  79. tcl/cpu/arm/arm946.tcl \
  80. tcl/cpu/arm/arm966.tcl \
  81. tcl/memory.tcl \
  82. tcl/mmr_helpers.tcl \
  83. tcl/readable.tcl
  84. # Convert .tcl to object
  85. $(top_builddir)/src/startup.o: $(top_srcdir)/src/startup.tcl
  86. ${OBJCOPY} -I binary -O ${OBJCOPY_FORMAT} -B ${OBJCOPY_ARCH} startup.tcl startup.o