summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2019-11-15 17:37:14 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2019-11-15 17:37:14 +0100
commit2a97037fcc57415151b7f69585772d6e774c8f04 (patch)
treeafc72f7a7be506e204a445b507cc29dce4ea7519
parentb5e8791cabec99138773e4dc13f8c6bb6f2701fc (diff)
Create DEBUG_FLAGS and use that in the Makefiles whenever appropriate, instead of adding -Wall -Werror directly to CXXFLAGS.
-rw-r--r--configure.ac3
-rw-r--r--plugin/Makefile.am6
-rw-r--r--plugingui/Makefile.am2
-rw-r--r--src/Makefile.am3
-rw-r--r--test/Makefile.am23
5 files changed, 32 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index ed8cc65..4e3d2ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,9 +127,10 @@ dnl Set up debug compile args if the user requested it
dnl ===========================
AS_IF([test "x$with_debug" == "xyes"],
[AC_MSG_WARN([*** Building with debug support!])
- CXXFLAGS="$CXXFLAGS -Wall -Werror -g $NO_UNDEFINED_PARAM"
+ DEBUG_FLAGS="-Wall -Werror -g $NO_UNDEFINED_PARAM"
HUGIN_PARM=""]
)
+AC_SUBST(DEBUG_FLAGS)
CXXFLAGS="$CXXFLAGS $HUGIN_PARM"
diff --git a/plugin/Makefile.am b/plugin/Makefile.am
index 3259751..078f38a 100644
--- a/plugin/Makefile.am
+++ b/plugin/Makefile.am
@@ -13,6 +13,7 @@ lv2plugin_DATA = manifest.ttl
endif
drumgizmo_la_CXXFLAGS = -DLV2 -DLV2_PLUGIN_URI=\"http://drumgizmo.org/lv2\" \
+ $(DEBUG_FLAGS) \
-fvisibility=hidden \
-I$(top_srcdir)/zita-resampler/libs \
$(LV2_CFLAGS) \
@@ -37,7 +38,9 @@ drumgizmo_la_LIBADD = $(LV2_LIBS) \
$(top_srcdir)/plugingui/libdggui.la \
$(top_srcdir)/src/libdg.la
-ttlgen_CPPFLAGS = $(DL_CFLAGS) -I$(top_srcdir)/plugin/plugingizmo
+ttlgen_CPPFLAGS = \
+ $(DEBUG_FLAGS) \
+ $(DL_CFLAGS) -I$(top_srcdir)/plugin/plugingizmo
ttlgen_LDFLAGS = $(DL_LIBS)
ttlgen_SOURCES = \
$(top_srcdir)/plugin/plugingizmo/ttlgen.cc
@@ -80,6 +83,7 @@ vstplugin_DATA =
endif
drumgizmo_vst_la_CXXFLAGS = -DVST \
+ $(DEBUG_FLAGS) \
-fvisibility=hidden \
-I$(top_srcdir)/zita-resampler/libs \
$(SNDFILE_CFLAGS) \
diff --git a/plugingui/Makefile.am b/plugingui/Makefile.am
index 0f3880a..1dc786e 100644
--- a/plugingui/Makefile.am
+++ b/plugingui/Makefile.am
@@ -37,6 +37,7 @@ resource_data.cc : rcgen $(RES)
./rcgen $(RES) > resource_data.cc
libdggui_la_CPPFLAGS = \
+ $(DEBUG_FLAGS) \
$(GUI_CPPFLAGS) \
-I$(top_srcdir)/hugin \
-I$(top_srcdir)/src \
@@ -165,6 +166,7 @@ endif
plugingui_LDADD = libdggui.la $(top_srcdir)/src/libdg.la
plugingui_CXXFLAGS = \
+ $(DEBUG_FLAGS) \
$(GUI_CPPFLAGS) \
$(SNDFILE_CXXFLAGS) \
$(PTHREAD_CFLAGS) \
diff --git a/src/Makefile.am b/src/Makefile.am
index 21c7194..aad6cbf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,7 +3,7 @@ noinst_LTLIBRARIES = libdg.la libzr.la libpugi.la
# libzita-resampler
libzr_la_CPPFLAGS = \
- -ffast-math -D_USE_MATH_DEFINES -Wno-unused-private-field $(PTHREAD_CFLAGS) \
+ -ffast-math -D_USE_MATH_DEFINES $(PTHREAD_CFLAGS) \
-I$(top_srcdir)/zita-resampler/libs
libzr_la_LIBADD = \
@@ -23,6 +23,7 @@ libpugi_la_SOURCES = \
# libdg
libdg_la_CPPFLAGS = \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/hugin -I$(top_srcdir)/pugixml/src \
$(SSEFLAGS) -I$(top_srcdir)/zita-resampler/libs
$(SNDFILE_CFLAGS) $(PTHREAD_CFLAGS)
diff --git a/test/Makefile.am b/test/Makefile.am
index 056c111..56d7fa3 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -22,6 +22,7 @@ endif
check_PROGRAMS = $(TESTS)
resource_CXXFLAGS = -DOUTPUT=\"resource\" $(SNDFILE_CFLAGS) \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/hugin
resource_LDFLAGS = $(SNDFILE_LIBS)
@@ -35,6 +36,7 @@ resource_SOURCES = \
resource_test.cc
audiocache_CXXFLAGS = -DOUTPUT=\"audiocache\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/hugin -DDISABLE_HUGIN $(PTHREAD_CFLAGS) $(SNDFILE_CFLAGS)
audiocache_LDFLAGS = $(PTHREAD_LIBS) $(SNDFILE_LIBS)
@@ -52,6 +54,7 @@ audiocache_SOURCES = \
audiocachetest.cc
audiocachefile_CXXFLAGS = -DOUTPUT=\"audiocachefile\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/hugin -DDISABLE_HUGIN $(PTHREAD_CFLAGS) $(SNDFILE_CFLAGS)
audiocachefile_LDFLAGS = $(PTHREAD_LIBS) $(SNDFILE_LIBS)
@@ -66,7 +69,7 @@ audiocachefile_SOURCES = \
audiocachefiletest.cc
audiocacheidmanager_CXXFLAGS = -DOUTPUT=\"audiocacheidmanager\" \
- \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/hugin -DDISABLE_HUGIN $(SNDFILE_CFLAGS)
audiocacheidmanager_LDFLAGS = $(SNDFILE_LIBS)
@@ -76,7 +79,7 @@ audiocacheidmanager_SOURCES = \
audiocacheidmanagertest.cc
audiocacheeventhandler_CXXFLAGS = -DOUTPUT=\"audiocacheeventhandler\" \
- \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/hugin -DDISABLE_HUGIN $(PTHREAD_CFLAGS) $(SNDFILE_CFLAGS)
audiocacheeventhandler_LDFLAGS = $(PTHREAD_LIBS) $(SNDFILE_LIBS)
@@ -90,6 +93,7 @@ audiocacheeventhandler_SOURCES = \
audiocacheeventhandlertest.cc
enginetest_CXXFLAGS = -DOUTPUT=\"enginetest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/hugin $(PTHREAD_CFLAGS) $(SNDFILE_CFLAGS)
enginetest_LDFLAGS = $(PTHREAD_LIBS) $(SNDFILE_LIBS) \
@@ -101,6 +105,7 @@ enginetest_SOURCES = \
enginetest.cc
paintertest_CXXFLAGS = -DOUTPUT=\"paintertest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src -I$(top_srcdir)/plugingui \
-I$(top_srcdir)/hugin $(PTHREAD_CFLAGS)
paintertest_LDFLAGS = $(top_srcdir)/plugingui/libdggui.la
@@ -110,6 +115,7 @@ paintertest_SOURCES = \
paintertest.cc
lv2_CXXFLAGS = -DOUTPUT=\"lv2\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src \
`pkg-config --cflags serd-0` `pkg-config --cflags lilv-0` \
-DLV2_PATH=\"@LV2DIR@\" $(SNDFILE_CFLAGS)
@@ -124,6 +130,7 @@ lv2_SOURCES = \
lv2.cc
configfile_CXXFLAGS = -DOUTPUT=\"configfile\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/hugin
configfile_LDFLAGS =
configfile_SOURCES = \
@@ -133,6 +140,7 @@ configfile_SOURCES = \
configtest.cc
randomtest_CXXFLAGS = -DOUTPUT=\"randomtest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/hugin -DDISABLE_HUGIN
randomtest_CFLAGS = -DDISABLE_HUGIN
@@ -143,16 +151,19 @@ randomtest_SOURCES = \
randomtest.cc
atomictest_CXXFLAGS = -DOUTPUT=\"atomictest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src -I$(top_srcdir)/hugin
atomictest_LDFLAGS =
atomictest_SOURCES = atomictest.cc dgtest.cc
syncedsettingstest_CXXFLAGS = -DOUTPUT=\"syncedsettingstest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src -I$(top_srcdir)/hugin
syncedsettingstest_LDFLAGS =
syncedsettingstest_SOURCES = syncedsettings.cc dgtest.cc
imagecachetest_CXXFLAGS = -DOUTPUT=\"imagecachetest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src -I$(top_srcdir)/plugingui -I$(top_srcdir)/hugin
imagecachetest_LDFLAGS = $(top_srcdir)/plugingui/libdggui.la
imagecachetest_SOURCES = \
@@ -161,6 +172,7 @@ imagecachetest_SOURCES = \
dgtest.cc
semaphoretest_CXXFLAGS = -DOUTPUT=\"semaphoretest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src -I$(top_srcdir)/hugin $(PTHREAD_CFLAGS)
semaphoretest_LDFLAGS = $(PTHREAD_LIBS)
semaphoretest_SOURCES = \
@@ -170,6 +182,7 @@ semaphoretest_SOURCES = \
dgtest.cc
drumkitcreatortest_CXXFLAGS = -DOUTPUT=\"drumkitcreatortest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/hugin -DDISABLE_HUGIN $(SNDFILE_CFLAGS)
drumkitcreatortest_CFLAGS = -DDISABLE_HUGIN
@@ -181,6 +194,7 @@ drumkitcreatortest_SOURCES = \
drumkitcreatortest.cc
bytesizeparsertest_CXXFLAGS = -DOUTPUT=\"bytesizeparsertest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src
bytesizeparsertest_LDFLAGS =
bytesizeparsertest_SOURCES = \
@@ -189,6 +203,7 @@ bytesizeparsertest_SOURCES = \
dgtest.cc
notifiertest_CXXFLAGS = -DOUTPUT=\"notifiertest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src
notifiertest_LDFLAGS =
notifiertest_SOURCES = \
@@ -196,6 +211,7 @@ notifiertest_SOURCES = \
dgtest.cc
dgxmlparsertest_CXXFLAGS = -DOUTPUT=\"dgxmlparsertest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src -I$(top_srcdir)/hugin \
-I$(top_srcdir)/pugixml/src
dgxmlparsertest_LDFLAGS =
@@ -208,6 +224,7 @@ dgxmlparsertest_SOURCES = \
dgtest.cc
domloadertest_CXXFLAGS = -DOUTPUT=\"domloadertest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src
domloadertest_LDFLAGS = \
$(top_srcdir)/src/libdg.la
@@ -218,6 +235,7 @@ domloadertest_SOURCES = \
dgtest.cc
configparsertest_CXXFLAGS = -DOUTPUT=\"configparsertest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src -I$(top_srcdir)/hugin \
-I$(top_srcdir)/pugixml/src
configparsertest_LDFLAGS =
@@ -229,6 +247,7 @@ configparsertest_SOURCES = \
dgtest.cc
midimapparsertest_CXXFLAGS = -DOUTPUT=\"midimapparsertest\" \
+ $(DEBUG_FLAGS) \
-I$(top_srcdir)/src -I$(top_srcdir)/hugin \
-I$(top_srcdir)/pugixml/src
midimapparsertest_LDFLAGS =