targets/gbm: convert to static/shared pipe-driver
[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 $(LIBDRM_LIBS) \
38 $(GALLIUM_COMMON_LIB_DEPS)
39
40 gbm_gallium_drm_la_LDFLAGS = \
41 -module \
42 -no-undefined \
43 -avoid-version \
44 $(GC_SECTIONS) \
45 $(LD_NO_UNDEFINED)
46
47 if HAVE_LD_VERSION_SCRIPT
48 gbm_gallium_drm_la_LDFLAGS += \
49 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/gbm/gbm.sym
50 endif
51
52 if HAVE_GALLIUM_STATIC_TARGETS
53
54 STATIC_TARGET_CPPFLAGS =
55 STATIC_TARGET_LIB_DEPS = \
56 $(top_builddir)/src/loader/libloader.la
57
58 if HAVE_GALLIUM_I915
59 STATIC_TARGET_CPPFLAGS += -DGALLIUM_I915
60 STATIC_TARGET_LIB_DEPS += \
61 $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
62 $(top_builddir)/src/gallium/drivers/i915/libi915.la \
63 $(INTEL_LIBS)
64 endif
65
66 if HAVE_GALLIUM_ILO
67 STATIC_TARGET_CPPFLAGS += -DGALLIUM_ILO
68 STATIC_TARGET_LIB_DEPS += \
69 $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
70 $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
71 $(INTEL_LIBS)
72 endif
73
74 if HAVE_GALLIUM_NOUVEAU
75 STATIC_TARGET_CPPFLAGS += -DGALLIUM_NOUVEAU
76 STATIC_TARGET_LIB_DEPS += \
77 $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
78 $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
79 $(NOUVEAU_LIBS)
80 endif
81
82 if NEED_RADEON_DRM_WINSYS
83 STATIC_TARGET_LIB_DEPS += \
84 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la
85 endif
86
87 if HAVE_GALLIUM_RADEON_COMMON
88 STATIC_TARGET_LIB_DEPS += \
89 $(top_builddir)/src/gallium/drivers/radeon/libradeon.la
90 endif
91
92 if HAVE_GALLIUM_R300
93 STATIC_TARGET_CPPFLAGS += -DGALLIUM_R300
94 STATIC_TARGET_LIB_DEPS += \
95 $(top_builddir)/src/gallium/drivers/r300/libr300.la \
96 $(top_builddir)/src/gallium/drivers/r300/libr300-helper.la \
97 $(RADEON_LIBS)
98 endif
99
100 if HAVE_GALLIUM_R600
101 STATIC_TARGET_CPPFLAGS += -DGALLIUM_R600
102 STATIC_TARGET_LIB_DEPS += \
103 $(top_builddir)/src/gallium/drivers/r600/libr600.la \
104 $(RADEON_LIBS)
105 endif
106
107 if HAVE_GALLIUM_RADEONSI
108 STATIC_TARGET_CPPFLAGS += -DGALLIUM_RADEONSI
109 STATIC_TARGET_LIB_DEPS += \
110 $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
111 $(RADEON_LIBS)
112 endif
113
114 if HAVE_GALLIUM_SVGA
115 STATIC_TARGET_CPPFLAGS += -DGALLIUM_VMWGFX
116 STATIC_TARGET_LIB_DEPS += \
117 $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
118 $(top_builddir)/src/gallium/drivers/svga/libsvga.la
119 endif
120
121 if HAVE_GALLIUM_FREEDRENO
122 STATIC_TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
123 STATIC_TARGET_LIB_DEPS += \
124 $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
125 $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
126 $(FREEDRENO_LIBS)
127
128 endif
129
130 gbm_gallium_drm_la_SOURCES += target.c
131 gbm_gallium_drm_la_CPPFLAGS = $(STATIC_TARGET_CPPFLAGS)
132 gbm_gallium_drm_la_LIBADD += $(STATIC_TARGET_LIB_DEPS)
133
134 else # HAVE_GALLIUM_STATIC_TARGETS
135 gbm_gallium_drm_la_LIBADD += \
136 $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la \
137 $(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \
138 $(GALLIUM_PIPE_LOADER_WINSYS_LIBS)
139
140 endif # HAVE_GALLIUM_STATIC_TARGETS
141
142 if HAVE_MESA_LLVM
143 gbm_gallium_drm_la_LIBADD += $(LLVM_LIBS)
144 gbm_gallium_drm_la_LDFLAGS += $(LLVM_LDFLAGS)
145 endif
146
147 TESTS = gallium-gbm-symbols-check