OSDN Git Service

c54f7a69d0df360ffc25c09efc1eec83ac0c9fb6
[android-x86/external-mesa.git] / src / gallium / targets / dri / Makefile.am
1 include $(top_srcdir)/src/gallium/Automake.inc
2
3 AM_CFLAGS = \
4         -I$(top_srcdir)/src/mapi \
5         -I$(top_srcdir)/src/mesa \
6         -I$(top_srcdir)/src \
7         -I$(top_srcdir)/src/mesa/drivers/dri/common \
8         -I$(top_srcdir)/src/gallium/state_trackers/dri \
9         $(GALLIUM_TARGET_CFLAGS)
10
11 AM_CPPFLAGS = \
12         $(DEFINES) \
13         -DGALLIUM_DDEBUG \
14         -DGALLIUM_NOOP \
15         -DGALLIUM_RBUG \
16         -DGALLIUM_TRACE
17
18 dridir = $(DRI_DRIVER_INSTALL_DIR)
19 dri_LTLIBRARIES = gallium_dri.la
20
21 nodist_EXTRA_gallium_dri_la_SOURCES = dummy.cpp
22 gallium_dri_la_SOURCES =
23
24 gallium_dri_la_LDFLAGS = \
25         -shared \
26         -shrext .so \
27         -module \
28         -no-undefined \
29         -avoid-version \
30         $(GC_SECTIONS) \
31         $(LD_NO_UNDEFINED)
32
33 if HAVE_LD_VERSION_SCRIPT
34 gallium_dri_la_LDFLAGS += \
35         -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri/dri.sym
36 endif # HAVE_LD_VERSION_SCRIPT
37
38 if HAVE_LD_DYNAMIC_LIST
39 gallium_dri_la_LDFLAGS += \
40         -Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
41 endif # HAVE_LD_DYNAMIC_LIST
42
43 gallium_dri_la_LIBADD = \
44         $(top_builddir)/src/mesa/libmesagallium.la \
45         $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
46         $(top_builddir)/src/mesa/drivers/dri/common/libmegadriver_stub.la \
47         $(top_builddir)/src/gallium/state_trackers/dri/libdri.la \
48         $(top_builddir)/src/gallium/auxiliary/libgalliumvl.la \
49         $(top_builddir)/src/gallium/auxiliary/libgallium.la \
50         $(top_builddir)/src/gallium/drivers/ddebug/libddebug.la \
51         $(top_builddir)/src/gallium/drivers/noop/libnoop.la \
52         $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
53         $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
54         $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
55         $(SELINUX_LIBS) \
56         $(EXPAT_LIBS) \
57         $(LIBDRM_LIBS) \
58         $(GALLIUM_COMMON_LIB_DEPS)
59
60 EXTRA_gallium_dri_la_DEPENDENCIES = \
61         dri.sym \
62         $(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
63 EXTRA_DIST = \
64         SConscript \
65         dri.sym \
66         $(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
67
68 TARGET_DRIVERS =
69 TARGET_CPPFLAGS =
70 TARGET_LIB_DEPS =
71
72 include $(top_srcdir)/src/gallium/drivers/i915/Automake.inc
73
74 include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
75
76 include $(top_srcdir)/src/gallium/drivers/r300/Automake.inc
77 include $(top_srcdir)/src/gallium/drivers/r600/Automake.inc
78 include $(top_srcdir)/src/gallium/drivers/radeonsi/Automake.inc
79
80 include $(top_srcdir)/src/gallium/drivers/svga/Automake.inc
81
82 include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
83
84 include $(top_srcdir)/src/gallium/drivers/vc4/Automake.inc
85 include $(top_srcdir)/src/gallium/drivers/vc5/Automake.inc
86 include $(top_srcdir)/src/gallium/drivers/pl111/Automake.inc
87
88 include $(top_srcdir)/src/gallium/drivers/virgl/Automake.inc
89
90 include $(top_srcdir)/src/gallium/drivers/etnaviv/Automake.inc
91 include $(top_srcdir)/src/gallium/drivers/imx/Automake.inc
92
93 include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc
94 include $(top_srcdir)/src/gallium/drivers/llvmpipe/Automake.inc
95 include $(top_srcdir)/src/gallium/drivers/swr/Automake.inc
96
97 if HAVE_GALLIUM_STATIC_TARGETS
98
99 gallium_dri_la_SOURCES += target.c
100 gallium_dri_la_CPPFLAGS = $(AM_CPPFLAGS) $(TARGET_CPPFLAGS)
101 gallium_dri_la_LIBADD += \
102         $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \
103         $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
104         $(TARGET_LIB_DEPS) \
105         $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
106
107 else # HAVE_GALLIUM_STATIC_TARGETS
108
109 gallium_dri_la_LIBADD += \
110         $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_dynamic.la
111
112 endif # HAVE_GALLIUM_STATIC_TARGETS
113
114 if HAVE_GALLIUM_LLVM
115 gallium_dri_la_LIBADD += $(LLVM_LIBS)
116 gallium_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
117 endif
118
119 if HAVE_COMPAT_SYMLINKS
120 # Add a link to allow setting LIBGL_DRIVERS_PATH to /lib/gallium of the build tree.
121 all-local: $(dri_LTLIBRARIES)
122         $(AM_V_GEN)link_dir=$(top_builddir)/$(LIB_DIR)/gallium;         \
123         $(MKDIR_P) $${link_dir};                                        \
124         for i in $(TARGET_DRIVERS); do                                  \
125                 ln -f .libs/gallium_dri.so                              \
126                         $${link_dir}/$${i}_dri.so;                      \
127         done
128
129 clean-local:
130         $(AM_V_GEN)link_dir=$(top_builddir)/$(LIB_DIR)/gallium;         \
131         $(AM_V_GEN)for i in $(TARGET_DRIVERS); do                       \
132                 $(RM) $${link_dir}/$${i}_dri.so;                        \
133         done;
134 endif
135
136 # hardlink each megadriver instance, but don't actually have
137 # gallium_dri.so in the set of final installed files.
138 install-data-hook:
139         for i in $(TARGET_DRIVERS); do                                  \
140                 ln -f $(DESTDIR)$(dridir)/gallium_dri.so                \
141                       $(DESTDIR)$(dridir)/$${i}_dri.so;                 \
142         done;                                                           \
143         $(RM) $(DESTDIR)$(dridir)/gallium_dri.*;                        \
144         $(RM) -d $(DESTDIR)$(dridir) &>/dev/null || true
145
146 uninstall-hook:
147         for i in $(TARGET_DRIVERS); do                                  \
148                 $(RM) $(DESTDIR)$(dridir)/$${i}_dri.so;                 \
149         done;