Makefile.am revision 35c4bbdf
1
2if DRI
3DRI_SUBDIR = dri
4DRI_LIB = dri/libdri.la
5endif
6
7if DRI2
8DRI2_SUBDIR = dri2
9DRI2_LIB = dri2/libdri2.la
10endif
11
12if DRI3
13DRI3_BUILDDIR = $(top_builddir)/dri3
14DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la
15endif
16
17if GLAMOR_EGL
18GLAMOR_EGL_SUBDIR = glamor_egl
19endif
20
21if XF86UTILS
22XF86UTILS_SUBDIR = utils
23endif
24
25if VGAHW
26VGAHW_SUBDIR = vgahw
27endif
28
29if VBE
30VBE_SUBDIR = vbe
31endif
32
33if INT10MODULE
34INT10_SUBDIR = int10
35endif
36
37SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
38	  ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \
39	  $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \
40	  fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \
41	  $(GLAMOR_EGL_SUBDIR) drivers
42
43DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
44               parser ramdac shadowfb vbe vgahw \
45               loader dixmods dri dri2 exa modes \
46	       utils doc man glamor_egl drivers
47
48bin_PROGRAMS = Xorg
49nodist_Xorg_SOURCES = sdksyms.c
50
51AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
52AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/parser \
53	-I$(srcdir)/ddc -I$(srcdir)/i2c -I$(srcdir)/modes -I$(srcdir)/ramdac \
54	-I$(srcdir)/dri -I$(srcdir)/dri2 -I$(top_srcdir)/dri3
55
56LOCAL_LIBS = \
57            $(MAIN_LIB) \
58            $(XSERVER_LIBS) \
59            loader/libloader.la \
60            common/libcommon.la \
61            os-support/libxorgos.la \
62            parser/libxf86config.la \
63            dixmods/libdixmods.la \
64            modes/libxf86modes.la \
65            ramdac/libramdac.la \
66            ddc/libddc.la \
67            i2c/libi2c.la \
68            $(XORG_LIBS) \
69            dixmods/libxorgxkb.la \
70            $(DRI_LIB) \
71            $(DRI2_LIB) \
72	    $(DRI3_LIB) \
73	    $(top_builddir)/miext/sync/libsync.la \
74            $(top_builddir)/mi/libmi.la \
75            $(top_builddir)/os/libos.la \
76	    $(top_builddir)/Xext/libXvidmode.la
77
78Xorg_LDADD = \
79            $(LOCAL_LIBS) \
80            $(XORG_SYS_LIBS) \
81            $(XSERVER_SYS_LIBS)
82Xorg_DEPENDENCIES = $(LOCAL_LIBS)
83
84Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
85
86if SUID_WRAPPER
87wrapdir = $(SUID_WRAPPER_DIR)
88wrap_PROGRAMS = Xorg.wrap
89Xorg_wrap_SOURCES = xorg-wrapper.c
90endif
91
92BUILT_SOURCES = xorg.conf.example
93DISTCLEANFILES = xorg.conf.example
94EXTRA_DIST = xorgconf.cpp
95
96# Without logdir, X will post an error on the terminal and will not start
97install-data-local:
98	$(AM_V_GEN)$(MKDIR_P) $(DESTDIR)$(logdir)
99if CYGWIN
100	$(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a
101endif
102
103install-exec-hook:
104	(cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) Xorg$(EXEEXT) X)
105if INSTALL_SETUID
106	chown root $(DESTDIR)$(bindir)/Xorg
107	chmod u+s $(DESTDIR)$(bindir)/Xorg
108endif
109if SUID_WRAPPER
110	$(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR)
111	mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg
112	${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg
113	-chown root $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap
114endif
115
116uninstall-local:
117if CYGWIN
118	$(AM_V_at)rm -f $(DESTDIR)$(libdir)/libXorg.exe.a
119endif
120
121uninstall-hook:
122	$(AM_V_at)rm -f $(DESTDIR)$(bindir)/X
123
124# Use variables from XORG_MANPAGE_SECTIONS and X Server configuration
125# Do not include manpages.am as values are not appropriate for rc files
126CONF_SUBSTS =	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \
127		-e 's|MODULEPATH|$(DEFAULT_MODULE_PATH)|g' \
128		-e 's|DEFAULTFONTPATH|$(COMPILEDDEFAULTFONTPATH)|g'
129
130xorg.conf.example: xorgconf.cpp
131	$(AM_V_GEN)$(SED) $(CONF_SUBSTS) < $(srcdir)/xorgconf.cpp > $@
132
133relink:
134	$(AM_V_at)rm -f Xorg$(EXEEXT) && $(MAKE) Xorg$(EXEEXT)
135
136CLEANFILES = sdksyms.c sdksyms.dep Xorg.sh
137EXTRA_DIST += sdksyms.sh
138
139sdksyms.dep sdksyms.c: sdksyms.sh
140	$(AM_V_GEN)CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS)
141
142SDKSYMS_DEP = sdksyms.dep
143-include $(SDKSYMS_DEP)
144
145i2c/libi2c.la:
146	$(AM_V_at)cd i2c && $(MAKE) libi2c.la
147
148dixmods/libdixmods.la:
149	$(AM_V_at)cd dixmods && $(MAKE) libdixmods.la
150
151dixmods/libxorgxkb.la:
152	$(AM_V_at)cd dixmods && $(MAKE) libxorgxkb.la
153