Makefile.am revision 6747b715
1include $(top_srcdir)/cpprules.in
2
3if DRI
4DRI_SUBDIR = dri
5endif
6
7if DRI2
8DRI2_SUBDIR = dri2
9endif
10
11if XF86UTILS
12XF86UTILS_SUBDIR = utils
13endif
14
15if XAA
16XAA_SUBDIR = xaa
17endif
18
19if VGAHW
20VGAHW_SUBDIR = vgahw
21endif
22
23if VBE
24VBE_SUBDIR = vbe
25endif
26
27if INT10MODULE
28INT10_SUBDIR = int10
29endif
30
31DOC_SUBDIR = doc
32
33SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \
34	  ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
35	  xf8_16bpp loader dixmods exa modes \
36	  $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
37
38DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
39               parser ramdac shadowfb vbe vgahw xaa \
40               xf8_16bpp loader dixmods dri dri2 exa modes \
41	       utils doc
42
43bin_PROGRAMS = Xorg
44Xorg_SOURCES = xorg.c
45
46AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
47INCLUDES = @XORG_INCS@ 
48
49noinst_LTLIBRARIES = libxorg.la
50libxorg_la_SOURCES = libxorg.c
51libxorg_la_LIBADD = \
52            $(XSERVER_LIBS) \
53            loader/libloader.la \
54            os-support/libxorgos.la \
55            common/libcommon.la \
56            parser/libxf86config_internal.la \
57            dixmods/libdixmods.la \
58            modes/libxf86modes.la \
59            ramdac/libramdac.la \
60            ddc/libddc.la \
61            i2c/libi2c.la \
62            dixmods/libxorgxkb.la \
63            $(top_builddir)/mi/libmi.la \
64            $(top_builddir)/os/libos.la \
65            @XORG_LIBS@
66
67libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD)
68
69libxorg.c xorg.c:
70	touch $@
71
72DISTCLEANFILES = libxorg.c xorg.c
73
74Xorg_DEPENDENCIES = libxorg.la
75Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
76
77Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
78
79BUILT_SOURCES = xorg.conf.example
80DISTCLEANFILES += xorg.conf.example xorg.conf.example.pre
81EXTRA_DIST = xorgconf.cpp
82
83if SPECIAL_DTRACE_OBJECTS
84# Re-add dtrace object code that gets lost when building static libraries
85Xorg_LDADD += $(XSERVER_LIBS)
86endif
87
88if SOLARIS_ASM_INLINE
89# Needs to be built before any files are compiled when using Sun compilers
90# so in*/out* inline definitions are properly processed.
91
92BUILT_SOURCES += os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il
93
94os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il:
95	cd os-support/solaris ; \
96	 $(MAKE) $(AM_MAKEFLAGS) solaris-@SOLARIS_INOUT_ARCH@.il
97endif
98
99# do not use $(mkdir_p) if you want automake 1.7 to work
100install-data-local:
101	mkdir -p $(DESTDIR)$(logdir)
102
103
104install-exec-local: install-binPROGRAMS
105	(cd $(DESTDIR)$(bindir) && rm -f X && ln -s Xorg X)
106if INSTALL_SETUID
107	chown root $(DESTDIR)$(bindir)/Xorg
108	chmod u+s $(DESTDIR)$(bindir)/Xorg
109endif
110
111CPP_FILES_FLAGS = \
112	$(MANDEFS) \
113	-DDEFAULTFONTPATH="\"$(COMPILEDDEFAULTFONTPATH)\"" \
114	-DMODULEPATH=\"$(DEFAULT_MODULE_PATH)\"
115
116relink:
117	$(AM_V_at)rm -f Xorg && $(MAKE) Xorg
118
119xorg.conf.example.pre: xorgconf.cpp
120	cp $(srcdir)/xorgconf.cpp $@
121