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