Makefile.am revision 4642e01f
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
15DOC_SUBDIR = doc
16
17SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser \
18	  ramdac shadowfb vbe vgahw xaa \
19	  xf8_16bpp loader dixmods exa modes \
20	  $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
21
22DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
23               parser ramdac shadowfb vbe vgahw xaa \
24               xf8_16bpp loader dixmods dri dri2 exa modes \
25	       utils doc
26
27bin_PROGRAMS = Xorg
28
29AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
30INCLUDES = @XORG_INCS@ 
31
32Xorg_SOURCES = xorg.c
33
34# libxorgos and libcommon need symbols from each other
35noinst_LTLIBRARIES = libosandcommon.la
36libosandcommon_la_SOURCES = osandcommon.c
37libosandcommon_la_LIBADD = \
38            os-support/libxorgos.la \
39            common/libcommon.la
40
41osandcommon.c xorg.c:
42	touch $@
43
44DISTCLEANFILES = osandcommon.c xorg.c
45
46XORG_LIBS = \
47            $(XSERVER_LIBS) \
48            common/libinit.a \
49            loader/libloader.a \
50            libosandcommon.la \
51            parser/libxf86config.a \
52	    dixmods/libdixmods.la \
53	    modes/libxf86modes.a \
54	    ramdac/libramdac.a \
55	    ddc/libddc.a \
56	    i2c/libi2c.a \
57	    dixmods/libxorgxkb.la \
58	    $(top_builddir)/mi/libmi.la \
59	    $(top_builddir)/os/libos.la \
60	    @XORG_LIBS@ \
61	    dixmods/libxorgxkb.la
62
63Xorg_DEPENDENCIES = $(XORG_LIBS)
64Xorg_LDADD = $(XORG_LIBS) $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
65
66Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
67
68BUILT_SOURCES = xorg.conf.example
69DISTCLEANFILES += xorg.conf.example xorg.conf.example.pre
70EXTRA_DIST = xorgconf.cpp
71
72if SOLARIS_ASM_INLINE
73# Needs to be built before any files are compiled when using Sun compilers
74# so in*/out* inline definitions are properly processed.
75
76BUILT_SOURCES += os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il
77
78os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il:
79	cd os-support/solaris ; make solaris-@SOLARIS_INOUT_ARCH@.il
80endif
81
82# do not use $(mkdir_p) if you want automake 1.7 to work
83install-data-local:
84	mkdir -p $(DESTDIR)$(logdir)
85
86
87install-exec-local: install-binPROGRAMS
88	(cd $(DESTDIR)$(bindir) && rm -f X && ln -s Xorg X)
89if INSTALL_SETUID
90	chown root $(DESTDIR)$(bindir)/Xorg
91	chmod u+s $(DESTDIR)$(bindir)/Xorg
92endif
93
94optionsdir = $(libdir)/X11
95dist_options_DATA = Options
96
97CPP_FILES_FLAGS = \
98	-DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \
99	-DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \
100	-DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \
101	-DTRUETYPEFONTPATH="\"$(BASE_FONT_PATH)/TTF\"" \
102	-DDPI75FONTPATH="\"$(BASE_FONT_PATH)/75dpi\"" \
103	-DDPI100FONTPATH="\"$(BASE_FONT_PATH)/100dpi\"" \
104	-DMODULEPATH=\"$(DEFAULT_MODULE_PATH)\"
105
106relink:
107	rm -f Xorg && $(MAKE) Xorg
108
109xorg.conf.example.pre: xorgconf.cpp
110	cp $(srcdir)/xorgconf.cpp $@
111