diff options
-rw-r--r-- | common.mk | 5 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/flash/Makefile.am | 6 | ||||
-rw-r--r-- | src/flash/nand/Makefile.am | 4 | ||||
-rw-r--r-- | src/flash/nor/Makefile.am | 4 | ||||
-rw-r--r-- | src/helper/Makefile.am | 5 | ||||
-rw-r--r-- | src/jtag/Makefile.am | 4 | ||||
-rw-r--r-- | src/jtag/drivers/Makefile.am | 4 | ||||
-rw-r--r-- | src/pld/Makefile.am | 4 | ||||
-rw-r--r-- | src/server/Makefile.am | 5 | ||||
-rw-r--r-- | src/svf/Makefile.am | 4 | ||||
-rw-r--r-- | src/target/Makefile.am | 5 | ||||
-rw-r--r-- | src/xsvf/Makefile.am | 4 |
13 files changed, 19 insertions, 43 deletions
diff --git a/common.mk b/common.mk new file mode 100644 index 00000000..d2273d78 --- /dev/null +++ b/common.mk @@ -0,0 +1,5 @@ + +# common flags used in openocd build +AM_CPPFLAGS = -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + -DPKGDATADIR=\"$(pkgdatadir)\" diff --git a/src/Makefile.am b/src/Makefile.am index 19a0ba96..c2d37c10 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/common.mk + SUBDIRS = \ jtag \ helper \ @@ -29,12 +31,6 @@ noinst_HEADERS = \ hello.h \ openocd.h - -# set the include path found by configure -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src - libopenocd_la_CPPFLAGS = -DPKGBLDDATE=\"`date +%F-%R`\" # banner output includes RELSTR appended to $VERSION from the configure script diff --git a/src/flash/Makefile.am b/src/flash/Makefile.am index 9d983a8d..ece40183 100644 --- a/src/flash/Makefile.am +++ b/src/flash/Makefile.am @@ -1,11 +1,9 @@ +include $(top_srcdir)/common.mk + SUBDIRS = \ nor \ nand -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src - METASOURCES = AUTO noinst_LTLIBRARIES = libflash.la libflash_la_SOURCES = \ diff --git a/src/flash/nand/Makefile.am b/src/flash/nand/Makefile.am index 8ea7b362..9aa0e69f 100644 --- a/src/flash/nand/Makefile.am +++ b/src/flash/nand/Makefile.am @@ -1,6 +1,4 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src +include $(top_srcdir)/common.mk noinst_LTLIBRARIES = libocdflashnand.la diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am index 852c0a37..e281c22b 100644 --- a/src/flash/nor/Makefile.am +++ b/src/flash/nor/Makefile.am @@ -1,6 +1,4 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src +include $(top_srcdir)/common.mk noinst_LTLIBRARIES = libocdflashnor.la libocdflashnor_la_SOURCES = \ diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am index c7218819..25585a48 100644 --- a/src/helper/Makefile.am +++ b/src/helper/Makefile.am @@ -1,7 +1,4 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ - -DPKGDATADIR=\"$(pkgdatadir)\" +include $(top_srcdir)/common.mk METASOURCES = AUTO noinst_LTLIBRARIES = libhelper.la diff --git a/src/jtag/Makefile.am b/src/jtag/Makefile.am index 59cd8fff..fa964a35 100644 --- a/src/jtag/Makefile.am +++ b/src/jtag/Makefile.am @@ -1,6 +1,4 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src +include $(top_srcdir)/common.mk METASOURCES = AUTO noinst_LTLIBRARIES = libjtag.la diff --git a/src/jtag/drivers/Makefile.am b/src/jtag/drivers/Makefile.am index 05881265..f3d5ab05 100644 --- a/src/jtag/drivers/Makefile.am +++ b/src/jtag/drivers/Makefile.am @@ -1,6 +1,4 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src +include $(top_srcdir)/common.mk noinst_LTLIBRARIES = libocdjtagdrivers.la diff --git a/src/pld/Makefile.am b/src/pld/Makefile.am index 3993622e..93b79f4a 100644 --- a/src/pld/Makefile.am +++ b/src/pld/Makefile.am @@ -1,6 +1,4 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src +include $(top_srcdir)/common.mk METASOURCES = AUTO noinst_LTLIBRARIES = libpld.la diff --git a/src/server/Makefile.am b/src/server/Makefile.am index ac24ebb5..a7c318ce 100644 --- a/src/server/Makefile.am +++ b/src/server/Makefile.am @@ -1,7 +1,4 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ - -DPKGDATADIR=\"$(pkgdatadir)\" +include $(top_srcdir)/common.mk METASOURCES = AUTO noinst_LTLIBRARIES = libserver.la diff --git a/src/svf/Makefile.am b/src/svf/Makefile.am index 398f9676..3a14d208 100644 --- a/src/svf/Makefile.am +++ b/src/svf/Makefile.am @@ -1,6 +1,4 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src +include $(top_srcdir)/common.mk METASOURCES = AUTO noinst_LTLIBRARIES = libsvf.la diff --git a/src/target/Makefile.am b/src/target/Makefile.am index 1e29ae7d..537c8c31 100644 --- a/src/target/Makefile.am +++ b/src/target/Makefile.am @@ -1,3 +1,4 @@ +include $(top_srcdir)/common.mk if OOCD_TRACE OOCD_TRACE_FILES = oocd_trace.c @@ -5,10 +6,6 @@ else OOCD_TRACE_FILES = endif -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src - BIN2C = $(top_builddir)/src/helper/bin2char$(EXEEXT_FOR_BUILD) DEBUG_HANDLER = $(srcdir)/xscale/debug_handler.bin diff --git a/src/xsvf/Makefile.am b/src/xsvf/Makefile.am index f96331cd..1b9cfab0 100644 --- a/src/xsvf/Makefile.am +++ b/src/xsvf/Makefile.am @@ -1,6 +1,4 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src +include $(top_srcdir)/common.mk METASOURCES = AUTO noinst_LTLIBRARIES = libxsvf.la |