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.

Makefile.am 2.7 KiB

Update autotools scripts to require automake 1.6. The configure.in script already required autoconf 2.59 (circa 2006), so there is no reason to support versions of automake older than 1.6 (circa 2002). The first part of this patch upgrades the configure.in script: 1. Use current calling conventions for the AC_INIT and AM_INIT_AUTOMAKE macros, bringing their usage up-to-date with the version of autoconf already specified by AC_PREREQ. 2. Add AC_CONFIG_SRCDIR macro, required by new version of AC_INIT. 3. Automatically enable all of automake's warnings except Makefile portability (which OpenOCD violates by using GNU make's $(wildcard)). [[ While automake has its own -Werror option, I did not enabled it due to existing warnings. ]] 4. Add the missing AM_PROG_C_O check, required by the build rules for openocd.o in src/Makefile.am. 5. Adjust version number to show progress toward the next release. 6. Include a bug reporting e-mail address to direct users to this list. This patch makes the following adjustments to the Makefile.am files: 1. Update AUTOMAKE_OPTIONS to require automake version 1.6 2. Rewrite all deprecated INCLUDES assignments as AM_CPPFLAGS 3. Clean-up all AM_CPPFLAGS declarations to be patch-friendly. 4. Remove vestigial references to $(all_includes) 5. Remove erroneous references to @CPPFLAGS@ (only use AM_CPPFLAGS) 6. Remove unused -I and -D directives in helper/, flash/, target/ git-svn-id: svn://svn.berlios.de/openocd/trunk@1591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
15 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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