Merge EXTRA_DEFINES and EXTRA_INCLUDES into AM_CPPFLAGS

AM_CPPFLAGS is a documented Automake variable for C preprocessor flags
that should not be overridden when compiling the package.

There is no need to have two additional variables that are ultimately
merged into AM_CPPFLAGS.

Their names are also confusing. EXTDA_DIST is a documented Automake
variable. Everything else that starts with "EXTRA" is not.
This commit is contained in:
Pavel Roskin 2016-10-17 10:33:28 -07:00
parent 85e98d211a
commit 0422734fc7
7 changed files with 70 additions and 100 deletions

View File

@ -1,39 +1,34 @@
EXTRA_DEFINES =
EXTRA_INCLUDES =
EXTRA_LIBS =
EXTRA_FLAGS =
if XRDP_DEBUG
EXTRA_DEFINES += -DXRDP_DEBUG
else
EXTRA_DEFINES += -DXRDP_NODEBUG
endif
if XRDP_NEUTRINORDP
EXTRA_DEFINES += -DXRDP_NEUTRINORDP
EXTRA_LIBS += $(FREERDP_LIBS)
endif
if XRDP_TJPEG
EXTRA_DEFINES += -DXRDP_JPEG -DXRDP_TJPEG
EXTRA_INCLUDES += @TurboJpegIncDir@
EXTRA_FLAGS += @TurboJpegLibDir@
EXTRA_LIBS += -lturbojpeg
else
if XRDP_JPEG
EXTRA_DEFINES += -DXRDP_JPEG
EXTRA_LIBS += -ljpeg
endif
endif
AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES) \
-I$(top_srcdir)/common \
$(EXTRA_INCLUDES)
-I$(top_srcdir)/common
if XRDP_DEBUG
AM_CPPFLAGS += -DXRDP_DEBUG
else
AM_CPPFLAGS += -DXRDP_NODEBUG
endif
if XRDP_NEUTRINORDP
AM_CPPFLAGS += -DXRDP_NEUTRINORDP
EXTRA_LIBS += $(FREERDP_LIBS)
endif
if XRDP_TJPEG
AM_CPPFLAGS += -DXRDP_JPEG -DXRDP_TJPEG @TurboJpegIncDir@
EXTRA_FLAGS += @TurboJpegLibDir@
EXTRA_LIBS += -lturbojpeg
else
if XRDP_JPEG
AM_CPPFLAGS += -DXRDP_JPEG
EXTRA_LIBS += -ljpeg
endif
endif
module_LTLIBRARIES = \
libxrdp.la

View File

@ -1,20 +1,17 @@
EXTRA_DEFINES =
if XRDP_DEBUG
EXTRA_DEFINES += -DXRDP_DEBUG
else
EXTRA_DEFINES += -DXRDP_NODEBUG
endif
AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES) \
-I$(top_srcdir)/common \
$(FREERDP_CFLAGS)
if XRDP_DEBUG
AM_CPPFLAGS += -DXRDP_DEBUG
else
AM_CPPFLAGS += -DXRDP_NODEBUG
endif
module_LTLIBRARIES = \
libxrdpneutrinordp.la

View File

@ -1,19 +1,16 @@
EXTRA_DEFINES =
if XRDP_DEBUG
EXTRA_DEFINES += -DXRDP_DEBUG
else
EXTRA_DEFINES += -DXRDP_NODEBUG
endif
AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES) \
-I$(top_srcdir)/common
if XRDP_DEBUG
AM_CPPFLAGS += -DXRDP_DEBUG
else
AM_CPPFLAGS += -DXRDP_NODEBUG
endif
module_LTLIBRARIES = \
librdp.la

View File

@ -1,31 +1,27 @@
EXTRA_DEFINES =
EXTRA_INCLUDES =
EXTRA_LIBS =
EXTRA_FLAGS =
if XRDP_FUSE
EXTRA_DEFINES += -DXRDP_FUSE
EXTRA_LIBS += -lfuse
endif
if XRDP_OPUS
EXTRA_DEFINES += -DXRDP_OPUS
EXTRA_LIBS += -lopus
endif
if XRDP_MP3LAME
EXTRA_DEFINES += -DXRDP_MP3LAME
EXTRA_LIBS += -lmp3lame
endif
AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES) \
-I$(top_srcdir)/common \
$(EXTRA_INCLUDES)
-I$(top_srcdir)/common
if XRDP_FUSE
AM_CPPFLAGS += -DXRDP_FUSE
EXTRA_LIBS += -lfuse
endif
if XRDP_OPUS
AM_CPPFLAGS += -DXRDP_OPUS
EXTRA_LIBS += -lopus
endif
if XRDP_MP3LAME
AM_CPPFLAGS += -DXRDP_MP3LAME
EXTRA_LIBS += -lmp3lame
endif
AM_CFLAGS = $(X_CFLAGS)

View File

@ -1,36 +1,33 @@
EXTRA_INCLUDES =
EXTRA_LIBS =
EXTRA_FLAGS =
if XRDP_DEBUG
EXTRA_DEFINES = -DXRDP_DEBUG
else
EXTRA_DEFINES = -DXRDP_NODEBUG
endif
if XRDP_RFXCODEC
EXTRA_DEFINES += -DXRDP_RFXCODEC
EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include
EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/.libs/librfxencode.a
endif
if XRDP_PIXMAN
EXTRA_DEFINES += -DXRDP_PIXMAN
EXTRA_INCLUDES += $(XRDP_PIXMAN_CFLAGS)
EXTRA_LIBS += $(XRDP_PIXMAN_LIBS)
endif
AM_CPPFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
-DXRDP_MODULE_PATH=\"${moduledir}\" \
$(EXTRA_DEFINES) \
-I$(top_builddir) \
-I$(top_srcdir)/common \
-I$(top_srcdir)/libxrdp \
$(EXTRA_INCLUDES)
-I$(top_srcdir)/libxrdp
if XRDP_DEBUG
AM_CPPFLAGS += -DXRDP_DEBUG
else
AM_CPPFLAGS += -DXRDP_NODEBUG
endif
if XRDP_RFXCODEC
AM_CPPFLAGS += -DXRDP_RFXCODEC
AM_CPPFLAGS += -I$(top_srcdir)/librfxcodec/include
EXTRA_LIBS += $(top_srcdir)/librfxcodec/src/.libs/librfxencode.a
endif
if XRDP_PIXMAN
AM_CPPFLAGS += -DXRDP_PIXMAN
AM_CPPFLAGS += $(XRDP_PIXMAN_CFLAGS)
EXTRA_LIBS += $(XRDP_PIXMAN_LIBS)
endif
sbin_PROGRAMS = \
xrdp

View File

@ -1,12 +1,6 @@
EXTRA_DEFINES =
EXTRA_INCLUDES =
EXTRA_LIBS =
EXTRA_FLAGS =
AM_CPPFLAGS = \
$(EXTRA_DEFINES) \
$(EXTRA_INCLUDES)
module_LTLIBRARIES = \
libxrdpapi.la

View File

@ -1,12 +1,6 @@
EXTRA_DEFINES =
EXTRA_INCLUDES =
EXTRA_LIBS =
EXTRA_FLAGS =
AM_CPPFLAGS = \
$(EXTRA_DEFINES) \
$(EXTRA_INCLUDES)
module_LTLIBRARIES = \
libxrdpvr.la