xserver-multidpi/hw/xfree86/Makefile.am
Alan Coopersmith 4cd91bd4c6 Enable no-undefined symbols mode in Solaris builds if -z parent is in ld
The Solaris linker recently added a -z parent flag for easier checking
of symbol definitions in plugins against the program that loads them.
If that's present, this enables it, along with -z defs to error on
undefined symbols to alert us if any modules call symbols that won't
be found at runtime.

This builds upon, and requires, the recent Cygwin work to build Xorg.
It moves a couple more modules to be after the Xorg binary in the build
order so that they can find the binary to check against, much as the
Cygwin changes did (these would be modules built on Solaris but not
Cygwin).

v2: This version only sets the flags for the xorg-server build itself,
and does not yet export them in xorg-server.pc to the drivers, since
most of the drivers are not ready to build with -no-undefined yet.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2012-07-02 11:09:02 -07:00

128 lines
3.3 KiB
Makefile

if DRI
DRI_SUBDIR = dri
endif
if DRI2
DRI2_SUBDIR = dri2
endif
if XF86UTILS
XF86UTILS_SUBDIR = utils
endif
XAA_SUBDIR = xaa
if VGAHW
VGAHW_SUBDIR = vgahw
endif
if VBE
VBE_SUBDIR = vbe
endif
if INT10MODULE
INT10_SUBDIR = int10
endif
SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
ramdac $(VGAHW_SUBDIR) loader modes . $(VBE_SUBDIR) \
$(XAA_SUBDIR) $(DRI_SUBDIR) $(DRI2_SUBDIR) i2c dixmods \
fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man
DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
parser ramdac shadowfb vbe vgahw xaa \
loader dixmods dri dri2 exa modes \
utils doc man
bin_PROGRAMS = Xorg
nodist_Xorg_SOURCES = sdksyms.c
AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
INCLUDES = $(XORG_INCS) -I$(srcdir)/parser -I$(top_srcdir)/miext/cw \
-I$(srcdir)/ddc -I$(srcdir)/i2c -I$(srcdir)/modes -I$(srcdir)/ramdac
LOCAL_LIBS = \
$(MAIN_LIB) \
$(XSERVER_LIBS) \
loader/libloader.la \
common/libcommon.la \
os-support/libxorgos.la \
parser/libxf86config_internal.la \
dixmods/libdixmods.la \
modes/libxf86modes.la \
ramdac/libramdac.la \
ddc/libddc.la \
i2c/libi2c.la \
dixmods/libxorgxkb.la \
$(XORG_LIBS) \
$(top_builddir)/mi/libmi.la \
$(top_builddir)/os/libos.la
Xorg_LDADD = \
$(LOCAL_LIBS) \
$(XORG_SYS_LIBS) \
$(XSERVER_SYS_LIBS)
Xorg_DEPENDENCIES = $(LOCAL_LIBS)
Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
BUILT_SOURCES = xorg.conf.example
DISTCLEANFILES = xorg.conf.example
EXTRA_DIST = xorgconf.cpp
if SOLARIS_ASM_INLINE
# Needs to be built before any files are compiled when using Sun compilers
# so in*/out* inline definitions are properly processed.
BUILT_SOURCES += os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il
os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il:
cd os-support/solaris ; \
$(MAKE) $(AM_MAKEFLAGS) solaris-@SOLARIS_INOUT_ARCH@.il
endif
# do not use $(mkdir_p) if you want automake 1.7 to work
install-data-local:
mkdir -p $(DESTDIR)$(logdir)
install-exec-local: install-binPROGRAMS
(cd $(DESTDIR)$(bindir) && rm -f X && ln -s Xorg X)
if INSTALL_SETUID
chown root $(DESTDIR)$(bindir)/Xorg
chmod u+s $(DESTDIR)$(bindir)/Xorg
endif
if CYGWIN
$(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a
endif
# Use variables from XORG_MANPAGE_SECTIONS and X Server configuration
# Do not include manpages.am as values are not appropriate for rc files
CONF_SUBSTS = -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \
-e 's|MODULEPATH|$(DEFAULT_MODULE_PATH)|g' \
-e 's|DEFAULTFONTPATH|$(COMPILEDDEFAULTFONTPATH)|g'
xorg.conf.example: xorgconf.cpp
$(AM_V_GEN)$(SED) $(CONF_SUBSTS) < $(srcdir)/xorgconf.cpp > $@
relink:
$(AM_V_at)rm -f Xorg$(EXEEXT) && $(MAKE) Xorg$(EXEEXT)
CLEANFILES = sdksyms.c sdksyms.dep
EXTRA_DIST += sdksyms.sh
sdksyms.dep sdksyms.c: sdksyms.sh
$(AM_V_GEN)CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(INCLUDES)
SDKSYMS_DEP = sdksyms.dep
include $(SDKSYMS_DEP)
i2c/libi2c.la:
$(AM_V_at)cd i2c && $(MAKE) libi2c.la
dixmods/libdixmods.la:
$(AM_V_at)cd dixmods && $(MAKE) libdixmods.la
dixmods/libxorgxkb.la:
$(AM_V_at)cd dixmods && $(MAKE) libxorgxkb.la