From a452d8d36aafda4a873f8c035a3fe3fd51fabd96 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 29 Jan 2016 22:45:00 -0800 Subject: [PATCH] Merge AM_CFLAGS and INCLUDES info AM_CPPFLAGS AM_CPPFLAGS is for flags passed to the preprocessor, such as defines and includes. AM_CFLAGS is for flags affecting the compiler, such as debug and optimization settings. INCLUDES is an obsolete name. Users can pass INCLUDES and break compilation. AM_CPPFLAGS is more explicit that the flags come from Automake and should not be overridden. --- common/Makefile.am | 2 +- keygen/Makefile.am | 6 ++---- libxrdp/Makefile.am | 6 ++---- mc/Makefile.am | 6 ++---- neutrinordp/Makefile.am | 6 ++---- rdp/Makefile.am | 6 ++---- sesman/Makefile.am | 6 ++---- sesman/chansrv/Makefile.am | 6 ++---- sesman/libscp/Makefile.am | 6 ++---- sesman/sessvc/Makefile.am | 6 ++---- sesman/tools/Makefile.am | 6 ++---- vnc/Makefile.am | 6 ++---- xrdp/Makefile.am | 6 ++---- xrdpapi/Makefile.am | 6 ++---- xrdpvr/Makefile.am | 6 ++---- xup/Makefile.am | 6 ++---- 16 files changed, 31 insertions(+), 61 deletions(-) diff --git a/common/Makefile.am b/common/Makefile.am index 8224c52d..c8501586 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -19,7 +19,7 @@ EXTRA_DIST = \ xrdp_rail.h \ crc16.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ diff --git a/keygen/Makefile.am b/keygen/Makefile.am index c28c063d..353f74df 100644 --- a/keygen/Makefile.am +++ b/keygen/Makefile.am @@ -1,11 +1,9 @@ -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common bin_PROGRAMS = \ diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am index 5435343b..5b89b0c3 100644 --- a/libxrdp/Makefile.am +++ b/libxrdp/Makefile.am @@ -28,14 +28,12 @@ EXTRA_LIBS += -ljpeg endif endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common \ $(EXTRA_INCLUDES) diff --git a/mc/Makefile.am b/mc/Makefile.am index eb000085..f56dac5f 100644 --- a/mc/Makefile.am +++ b/mc/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = mc.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/neutrinordp/Makefile.am b/neutrinordp/Makefile.am index 93e1196a..58fe9bc2 100644 --- a/neutrinordp/Makefile.am +++ b/neutrinordp/Makefile.am @@ -7,14 +7,12 @@ else EXTRA_DEFINES += -DXRDP_NODEBUG endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common \ $(FREERDP_CFLAGS) diff --git a/rdp/Makefile.am b/rdp/Makefile.am index 9b519d7c..6d23b287 100644 --- a/rdp/Makefile.am +++ b/rdp/Makefile.am @@ -7,14 +7,12 @@ else EXTRA_DEFINES += -DXRDP_NODEBUG endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/sesman/Makefile.am b/sesman/Makefile.am index 55056031..979f72d9 100644 --- a/sesman/Makefile.am +++ b/sesman/Makefile.am @@ -2,13 +2,11 @@ EXTRA_DIST = sesman.ini startwm.sh sesman.h access.h auth.h config.h env.h \ scp.h scp_v0.h scp_v1.h scp_v1_mng.h session.h sig.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common \ -I$(top_srcdir)/sesman/libscp diff --git a/sesman/chansrv/Makefile.am b/sesman/chansrv/Makefile.am index 755de786..1a0be24c 100644 --- a/sesman/chansrv/Makefile.am +++ b/sesman/chansrv/Makefile.am @@ -31,14 +31,12 @@ EXTRA_DEFINES += -DXRDP_OPUS EXTRA_LIBS += -lopus endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_srcdir)/common \ $(EXTRA_INCLUDES) diff --git a/sesman/libscp/Makefile.am b/sesman/libscp/Makefile.am index eaf518a8..3172f2cb 100644 --- a/sesman/libscp/Makefile.am +++ b/sesman/libscp/Makefile.am @@ -1,13 +1,11 @@ EXTRA_DIST = libscp_connection.h libscp_commands.h libscp.h libscp_session.h libscp_types_mng.h libscp_v1c_mng.h libscp_vX.h libscp_commands_mng.h libscp_init.h libscp_tcp.h libscp_v0.h libscp_v1s.h libscp_lock.h \ libscp_types.h libscp_v1c.h libscp_v1s_mng.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/sesman/sessvc/Makefile.am b/sesman/sessvc/Makefile.am index 8ba24abd..c2714b94 100644 --- a/sesman/sessvc/Makefile.am +++ b/sesman/sessvc/Makefile.am @@ -1,11 +1,9 @@ -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common sbin_PROGRAMS = \ diff --git a/sesman/tools/Makefile.am b/sesman/tools/Makefile.am index 140c6820..fa4568ef 100644 --- a/sesman/tools/Makefile.am +++ b/sesman/tools/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = tcp.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common \ -I$(top_srcdir)/sesman/libscp \ -I$(top_srcdir)/sesman diff --git a/vnc/Makefile.am b/vnc/Makefile.am index 24835011..a9a3aa14 100644 --- a/vnc/Makefile.am +++ b/vnc/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = vnc.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \ diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am index 8014761a..308f01a4 100644 --- a/xrdp/Makefile.am +++ b/xrdp/Makefile.am @@ -17,15 +17,13 @@ EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/librfxencode.a endif -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -DXRDP_LIB_PATH=\"${libdir}\" \ - $(EXTRA_DEFINES) - -INCLUDES = \ + $(EXTRA_DEFINES) \ -I$(top_builddir) \ -I$(top_srcdir)/common \ -I$(top_srcdir)/libxrdp \ diff --git a/xrdpapi/Makefile.am b/xrdpapi/Makefile.am index 88ef100e..8107ffeb 100644 --- a/xrdpapi/Makefile.am +++ b/xrdpapi/Makefile.am @@ -5,10 +5,8 @@ EXTRA_INCLUDES = EXTRA_LIBS = EXTRA_FLAGS = -AM_CFLAGS = \ - $(EXTRA_DEFINES) - -INCLUDES = \ +AM_CPPFLAGS = \ + $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) lib_LTLIBRARIES = \ diff --git a/xrdpvr/Makefile.am b/xrdpvr/Makefile.am index 158baa90..f232ce41 100644 --- a/xrdpvr/Makefile.am +++ b/xrdpvr/Makefile.am @@ -5,10 +5,8 @@ EXTRA_INCLUDES = EXTRA_LIBS = EXTRA_FLAGS = -AM_CFLAGS = \ - $(EXTRA_DEFINES) - -INCLUDES = \ +AM_CPPFLAGS = \ + $(EXTRA_DEFINES) \ $(EXTRA_INCLUDES) lib_LTLIBRARIES = \ diff --git a/xup/Makefile.am b/xup/Makefile.am index 544c957a..d7017b42 100644 --- a/xup/Makefile.am +++ b/xup/Makefile.am @@ -1,12 +1,10 @@ EXTRA_DIST = xup.h -AM_CFLAGS = \ +AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" - -INCLUDES = \ + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ -I$(top_srcdir)/common lib_LTLIBRARIES = \