aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.mk5
-rw-r--r--configure.ac4
2 files changed, 6 insertions, 3 deletions
diff --git a/common.mk b/common.mk
index f301c3ac..dbacf19f 100644
--- a/common.mk
+++ b/common.mk
@@ -1,6 +1,9 @@
# common flags used in openocd build
-AM_CPPFLAGS = -I$(top_srcdir)/src \
+AM_CFLAGS = $(GCC_WARNINGS)
+
+AM_CPPFLAGS = $(HOST_CPPFLAGS)\
+ -I$(top_srcdir)/src \
-I$(top_builddir)/src \
-I$(top_srcdir)/src/helper \
-DPKGDATADIR=\"$(pkgdatadir)\" \
diff --git a/configure.ac b/configure.ac
index e178d451..50585247 100644
--- a/configure.ac
+++ b/configure.ac
@@ -471,7 +471,7 @@ AS_CASE([$host],
AC_MSG_ERROR([buspirate currently not supported by MinGW32 hosts])
])
- CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO"
+ AC_SUBST([HOST_CPPFLAGS], [-D__USE_MINGW_ANSI_STDIO])
AC_DEFINE([IS_MINGW], [1], [1 if building for MinGW.])
AC_DEFINE([IS_WIN32], [1], [1 if building for Win32.])
@@ -785,7 +785,7 @@ AS_IF([test "x${gcc_werror}" = "xyes"], [
# overide default gcc cflags
AS_IF([test "x$gcc_warnings" = "xyes"], [
- CFLAGS="$CFLAGS $GCC_WARNINGS"
+ AC_SUBST([GCC_WARNINGS], [$GCC_WARNINGS])
])
AC_CONFIG_FILES([