xrdp/libxrdp/Makefile.am
Pavel Roskin ee1a237685 Remove GOT_PREFIX, it's a broken hack of limited utility
To add flags to the compiler, CFLAGS, CPPFLAGS or LDFLAGS can be used on
the configure command line.

The need to add flags depends on the location of the headers and
libraries of the dependencies, which is orthogonal to the directory where
xrdp will be installed.

The implementation in configure.ac has a stray closing bracket, making
GOT_PREFIX true even if --prefix is not passed.

The implementation is inconsistent - the only affected makefiles are for
xrdp and libxrdp.

Changing rpath manually is wrong in most cases. Libtool should be able to
set rpath correctly on its own.

Using $(prefix)/lib ignores the libdir setting. For many 64-bit systems,
/usr/lib is used for 32-bit libraries. Adding 32-bit libraries to the
rpath slows down 64-bit executables, as the dynamic loader searches for
libraries in a wrong directory.

There is no way to disable GOT_PREFIX if --prefix has to be passed.
Fedora RPM patches configure.ac and needs to rerun autoconf and automake
after that.
2016-01-26 22:36:59 -08:00

67 lines
1.2 KiB
Makefile

EXTRA_DIST = libxrdp.h libxrdpinc.h xrdp_orders_rail.h
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_CFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
$(EXTRA_DEFINES)
INCLUDES = \
-I$(top_srcdir)/common \
$(EXTRA_INCLUDES)
lib_LTLIBRARIES = \
libxrdp.la
libxrdp_la_SOURCES = \
libxrdp.c \
xrdp_channel.c \
xrdp_iso.c \
xrdp_mcs.c \
xrdp_orders.c \
xrdp_rdp.c \
xrdp_sec.c \
xrdp_bitmap_compress.c \
xrdp_bitmap32_compress.c \
xrdp_jpeg_compress.c \
xrdp_orders_rail.c \
xrdp_mppc_enc.c \
xrdp_fastpath.c \
xrdp_caps.c
libxrdp_la_LDFLAGS = \
$(EXTRA_FLAGS)
libxrdp_la_LIBADD = \
$(top_builddir)/common/libcommon.la \
$(EXTRA_LIBS)