aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ipc-modem/Makefile.am
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-06-10 22:45:17 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-07-22 18:46:34 +0200
commite4840993bbc77d640cb2d4c866e8e60e2deb27a9 (patch)
treede10681e3e7c3bd1d152d00fe428071065a5187c /tools/ipc-modem/Makefile.am
parent217209ce8f494788d03fe8dc4d28c07d47eaeffd (diff)
downloadhardware_replicant_libsamsung-ipc-e4840993bbc77d640cb2d4c866e8e60e2deb27a9.tar.gz
hardware_replicant_libsamsung-ipc-e4840993bbc77d640cb2d4c866e8e60e2deb27a9.tar.bz2
hardware_replicant_libsamsung-ipc-e4840993bbc77d640cb2d4c866e8e60e2deb27a9.zip
configure.ac: Add an option to use scripts/guix.scm's strict CFLAGS
The CFLAGS that are in the %common-strict-cflags in scripts/guix.scm have been validated with both GCC and CLANG and they are useful to find potential issues in the code or code that won't compile on Android. However while the scripts/guix.scm script is really useful to test commits once they are ready, it is less convenient to use it when fixing issues in commits that are still being worked on. This is because it is not as fast as building libsamsung-ipc directly because: - it requires a clean source directory to work (this can be done with make distclean) so we can't reuse the current build output - libsamsung-ipc source code is copied and built 5 times (in different configurations) As for the implementation, AM_CFLAGS was used instead of appending to the default CFLAGS as CFLAGS is meant to be a variable for users. The effect is that both are independent, so if users don't want strict CFLAGS, they would need to not use --enable-strict-cflags. And it was implemented as a shell script to at the same time: - Enable to have comments, and good formating of the flags. - Enable to share the cflags between guix.scm and the autotools. - Keep the complexity low to keep it working in most situations. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'tools/ipc-modem/Makefile.am')
-rw-r--r--tools/ipc-modem/Makefile.am4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/ipc-modem/Makefile.am b/tools/ipc-modem/Makefile.am
index 069f082..2f6b537 100644
--- a/tools/ipc-modem/Makefile.am
+++ b/tools/ipc-modem/Makefile.am
@@ -4,6 +4,10 @@ AM_CFLAGS = \
-I$(top_srcdir)/include \
$(NULL)
+if WANT_STRICT_CFLAGS
+AM_CFLAGS += $(STRICT_CFLAGS)
+endif
+
bin_PROGRAMS = ipc-modem
# TODO: Find a way to make test more modular and represent each run of the