summaryrefslogtreecommitdiff
path: root/hw/xfree86/Makefile.am
blob: 898c9b846d37792dab5ab9ed85498b4122ce3f7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
include $(top_srcdir)/cpprules.in

if DRI
DRI_SUBDIR = dri
endif

if DRI2
DRI2_SUBDIR = dri2
endif

if XF86UTILS
XF86UTILS_SUBDIR = utils
endif

if XAA
XAA_SUBDIR = xaa
endif

if VGAHW
VGAHW_SUBDIR = vgahw
endif

if VBE
VBE_SUBDIR = vbe
endif

if INT10MODULE
INT10_SUBDIR = int10
endif

DOC_SUBDIR = doc

SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \
	  ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
	  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_la_DEPENDENCIES = $(libxorg_la_LIBADD)

libxorg.c xorg.c:
	touch $@

DISTCLEANFILES = libxorg.c xorg.c

Xorg_DEPENDENCIES = libxorg.la
Xorg_LDADD = $(MAIN_LIB) 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 XSERVER_DTRACE
# Re-add dtrace object code that gets lost when building static libraries
Xorg_LDADD += $(XSERVER_LIBS)
endif

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

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 $@