xserver-multidpi/hw/xfree86/Makefile.am
Paulo Cesar Pereira de Andrade b1dac41fb3 Use libtool convenience libraries and better "symbol" table.
All .a libraries were converted to .la, and instead of linking the
Xorg binary with a mix of .a and .la, and adding some libraries more
then once in the command line, etc, now it generates a single libxorg.la
from all the required convenience libraries, and links with a dummy
xorg.c (that should usually be the file with the main function...).
This removes the requirement of some things like libosandcommon and
libinit, that existed to circumvent problems when linking multiple
.a and .la in the final Xorg binary.

  The "symbol table" is now generated dynamically, by a shell script,
with an embedded gawk parser that parses cpp output. The new file
sdksyms.sh is generated by hand by analyzing all Makefile.am's and
making it create a sdksyms.c file, that includes all sdk headers that
will add symbols for the Xorg binary. Module headers aren't read, and
a in 2 files it was required to add a "<hash>ifndef XorgLoader" around
declarations shared between the Xorg binary and libextmod. A few
other changes were added to other sdk headers, like preventing
multiple inclusion, or including other headers to satisfy dependencies.

  This should be a lot more portable, and better (hopefully properly)
using libtool to generate convenience libraries.
2008-12-07 02:22:19 -02:00

105 lines
2.7 KiB
Makefile

include $(top_srcdir)/cpprules.in
if DRI
DRI_SUBDIR = dri
endif
if DRI2
DRI2_SUBDIR = dri2
endif
if XF86UTILS
XF86UTILS_SUBDIR = utils
endif
DOC_SUBDIR = doc
SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support parser \
ramdac shadowfb vbe vgahw xaa \
xf8_16bpp loader dixmods exa modes \
$(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
parser ramdac shadowfb vbe vgahw xaa \
xf8_16bpp loader dixmods dri dri2 exa modes \
utils doc
bin_PROGRAMS = Xorg
Xorg_SOURCES = xorg.c
AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
INCLUDES = @XORG_INCS@
noinst_LTLIBRARIES = libxorg.la
libxorg_la_SOURCES = libxorg.c
libxorg_la_LIBADD = \
$(XSERVER_LIBS) \
loader/libloader.la \
os-support/libxorgos.la \
common/libcommon.la \
parser/libxf86config.la \
dixmods/libdixmods.la \
modes/libxf86modes.la \
ramdac/libramdac.la \
ddc/libddc.la \
i2c/libi2c.la \
dixmods/libxorgxkb.la \
$(top_builddir)/mi/libmi.la \
$(top_builddir)/os/libos.la \
@XORG_LIBS@
libxorg.c xorg.c:
touch $@
DISTCLEANFILES = libxorg.c xorg.c
Xorg_DEPENDENCIES = libxorg.la
Xorg_LDADD = libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
BUILT_SOURCES = xorg.conf.example
DISTCLEANFILES += xorg.conf.example xorg.conf.example.pre
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 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
optionsdir = $(libdir)/X11
dist_options_DATA = Options
CPP_FILES_FLAGS = \
$(MANDEFS) \
-DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \
-DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \
-DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \
-DTRUETYPEFONTPATH="\"$(BASE_FONT_PATH)/TTF\"" \
-DDPI75FONTPATH="\"$(BASE_FONT_PATH)/75dpi\"" \
-DDPI100FONTPATH="\"$(BASE_FONT_PATH)/100dpi\"" \
-DMODULEPATH=\"$(DEFAULT_MODULE_PATH)\"
relink:
rm -f Xorg && $(MAKE) Xorg
xorg.conf.example.pre: xorgconf.cpp
cp $(srcdir)/xorgconf.cpp $@