build: add common.mk

Rather than specifying common makefile variables move
them all to a common.mk.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
This commit is contained in:
Spencer Oliver 2010-11-12 11:41:55 +00:00
parent ab263fafbb
commit 838cd58e24
13 changed files with 19 additions and 43 deletions

5
common.mk Normal file
View File

@ -0,0 +1,5 @@
# common flags used in openocd build
AM_CPPFLAGS = -I$(top_srcdir)/src \
-I$(top_builddir)/src \
-DPKGDATADIR=\"$(pkgdatadir)\"

View File

@ -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

View File

@ -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 = \

View File

@ -1,6 +1,4 @@
AM_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_builddir)/src
include $(top_srcdir)/common.mk
noinst_LTLIBRARIES = libocdflashnand.la

View File

@ -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 = \

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,4 @@
AM_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_builddir)/src
include $(top_srcdir)/common.mk
noinst_LTLIBRARIES = libocdjtagdrivers.la

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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