gallium: Add libmesautil dependency to gdm and xa targets
[mesa.git] / src / gallium / targets / gbm / Makefile.am
1 # Copyright © 2012 Intel Corporation
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 # DEALINGS IN THE SOFTWARE.
22
23 include $(top_srcdir)/src/gallium/Automake.inc
24
25 AM_CFLAGS = \
26 $(GALLIUM_TARGET_CFLAGS)
27
28 gbmdir = $(libdir)/gbm
29 gbm_LTLIBRARIES = gbm_gallium_drm.la
30
31 nodist_EXTRA_gbm_gallium_drm_la_SOURCES = dummy.cpp
32 gbm_gallium_drm_la_SOURCES =
33
34 gbm_gallium_drm_la_LIBADD = \
35 $(top_builddir)/src/gallium/state_trackers/gbm/libgbm.la \
36 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
37 $(top_builddir)/src/util/libmesautil.la \
38 $(LIBDRM_LIBS) \
39 $(GALLIUM_COMMON_LIB_DEPS)
40
41 gbm_gallium_drm_la_LDFLAGS = \
42 -module \
43 -no-undefined \
44 -avoid-version \
45 $(GC_SECTIONS) \
46 $(LD_NO_UNDEFINED)
47
48 if HAVE_LD_VERSION_SCRIPT
49 gbm_gallium_drm_la_LDFLAGS += \
50 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/gbm/gbm.sym
51 endif
52
53 if HAVE_GALLIUM_STATIC_TARGETS
54
55 STATIC_TARGET_CPPFLAGS =
56 STATIC_TARGET_LIB_DEPS = \
57 $(top_builddir)/src/loader/libloader.la
58
59 if HAVE_GALLIUM_I915
60 STATIC_TARGET_CPPFLAGS += -DGALLIUM_I915
61 STATIC_TARGET_LIB_DEPS += \
62 $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
63 $(top_builddir)/src/gallium/drivers/i915/libi915.la \
64 $(INTEL_LIBS)
65 endif
66
67 if HAVE_GALLIUM_ILO
68 STATIC_TARGET_CPPFLAGS += -DGALLIUM_ILO
69 STATIC_TARGET_LIB_DEPS += \
70 $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
71 $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
72 $(INTEL_LIBS)
73 endif
74
75 if HAVE_GALLIUM_NOUVEAU
76 STATIC_TARGET_CPPFLAGS += -DGALLIUM_NOUVEAU
77 STATIC_TARGET_LIB_DEPS += \
78 $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
79 $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
80 $(NOUVEAU_LIBS)
81 endif
82
83 if NEED_RADEON_DRM_WINSYS
84 STATIC_TARGET_LIB_DEPS += \
85 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la
86 endif
87
88 if HAVE_GALLIUM_RADEON_COMMON
89 STATIC_TARGET_LIB_DEPS += \
90 $(top_builddir)/src/gallium/drivers/radeon/libradeon.la
91 endif
92
93 if HAVE_GALLIUM_R300
94 STATIC_TARGET_CPPFLAGS += -DGALLIUM_R300
95 STATIC_TARGET_LIB_DEPS += \
96 $(top_builddir)/src/gallium/drivers/r300/libr300.la \
97 $(top_builddir)/src/gallium/drivers/r300/libr300-helper.la \
98 $(RADEON_LIBS)
99 endif
100
101 if HAVE_GALLIUM_R600
102 STATIC_TARGET_CPPFLAGS += -DGALLIUM_R600
103 STATIC_TARGET_LIB_DEPS += \
104 $(top_builddir)/src/gallium/drivers/r600/libr600.la \
105 $(RADEON_LIBS)
106 endif
107
108 if HAVE_GALLIUM_RADEONSI
109 STATIC_TARGET_CPPFLAGS += -DGALLIUM_RADEONSI
110 STATIC_TARGET_LIB_DEPS += \
111 $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
112 $(RADEON_LIBS)
113 endif
114
115 if HAVE_GALLIUM_SVGA
116 STATIC_TARGET_CPPFLAGS += -DGALLIUM_VMWGFX
117 STATIC_TARGET_LIB_DEPS += \
118 $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
119 $(top_builddir)/src/gallium/drivers/svga/libsvga.la
120 endif
121
122 if HAVE_GALLIUM_FREEDRENO
123 STATIC_TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
124 STATIC_TARGET_LIB_DEPS += \
125 $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
126 $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
127 $(FREEDRENO_LIBS)
128
129 endif
130
131 gbm_gallium_drm_la_SOURCES += target.c
132 gbm_gallium_drm_la_CPPFLAGS = $(STATIC_TARGET_CPPFLAGS)
133 gbm_gallium_drm_la_LIBADD += $(STATIC_TARGET_LIB_DEPS)
134
135 else # HAVE_GALLIUM_STATIC_TARGETS
136 gbm_gallium_drm_la_LIBADD += \
137 $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \
138 $(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \
139 $(GALLIUM_PIPE_LOADER_WINSYS_LIBS)
140
141 endif # HAVE_GALLIUM_STATIC_TARGETS
142
143 if HAVE_MESA_LLVM
144 gbm_gallium_drm_la_LIBADD += $(LLVM_LIBS)
145 gbm_gallium_drm_la_LDFLAGS += $(LLVM_LDFLAGS)
146 endif
147
148 TESTS = gallium-gbm-symbols-check