targets/pipe-loader: compact duplicating LDFLAGS
[mesa.git] / src / gallium / targets / pipe-loader / 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_CPPFLAGS = \
26 $(GALLIUM_CFLAGS) \
27 -I$(top_srcdir)/include \
28 -I$(top_srcdir)/src/gallium/drivers \
29 -I$(top_srcdir)/src/gallium/winsys \
30 $(LIBDRM_CFLAGS) \
31 -DGALLIUM_RBUG \
32 -DGALLIUM_TRACE \
33 -DGALLIUM_GALAHAD
34
35 pipedir = $(libdir)/gallium-pipe
36 pipe_LTLIBRARIES =
37
38 PIPE_LIBS = \
39 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
40 $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
41 $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
42 $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
43 $(DLOPEN_LIBS) \
44 $(CLOCK_LIB) \
45 -lpthread \
46 -lm
47
48 AM_LDFLAGS = \
49 -module \
50 -no-undefined \
51 -avoid-version \
52 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/pipe-loader/pipe.link
53
54 if HAVE_MESA_LLVM
55 AM_LDFLAGS += $(LLVM_LDFLAGS)
56 endif
57
58 if HAVE_GALLIUM_I915
59 pipe_LTLIBRARIES += pipe_i915.la
60 pipe_i915_la_SOURCES = pipe_i915.c
61 pipe_i915_la_LIBADD = \
62 $(PIPE_LIBS) \
63 $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
64 $(top_builddir)/src/gallium/drivers/i915/libi915.la \
65 $(LIBDRM_LIBS) \
66 $(INTEL_LIBS)
67
68 if HAVE_MESA_LLVM
69 nodist_EXTRA_pipe_i915_la_SOURCES = dummy.cpp
70 pipe_i915_la_LIBADD += $(LLVM_LIBS)
71 endif
72 endif
73
74 if HAVE_GALLIUM_NOUVEAU
75 pipe_LTLIBRARIES += pipe_nouveau.la
76 pipe_nouveau_la_SOURCES = pipe_nouveau.c
77 nodist_EXTRA_pipe_nouveau_la_SOURCES = dummy.cpp
78 pipe_nouveau_la_LIBADD = \
79 $(PIPE_LIBS) \
80 $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
81 $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
82 $(LIBDRM_LIBS) \
83 $(NOUVEAU_LIBS)
84
85 if HAVE_MESA_LLVM
86 pipe_nouveau_la_LIBADD += $(LLVM_LIBS)
87 endif
88 endif
89
90 if HAVE_GALLIUM_R300
91 pipe_LTLIBRARIES += pipe_r300.la
92 pipe_r300_la_SOURCES = pipe_r300.c
93 nodist_EXTRA_pipe_r300_la_SOURCES = dummy.cpp
94 pipe_r300_la_LIBADD = \
95 $(PIPE_LIBS) \
96 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
97 $(top_builddir)/src/gallium/drivers/r300/libr300-helper.la \
98 $(top_builddir)/src/gallium/drivers/r300/libr300.la \
99 $(LIBDRM_LIBS) \
100 $(RADEON_LIBS)
101
102 if HAVE_MESA_LLVM
103 pipe_r300_la_LIBADD += $(LLVM_LIBS)
104 endif
105 endif
106
107 if HAVE_GALLIUM_R600
108 pipe_LTLIBRARIES += pipe_r600.la
109 pipe_r600_la_SOURCES = pipe_r600.c
110 pipe_r600_la_LIBADD = \
111 $(PIPE_LIBS) \
112 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
113 $(top_builddir)/src/gallium/drivers/r600/libr600.la \
114 $(LIBDRM_LIBS) \
115 $(RADEON_LIBS)
116
117 if HAVE_MESA_LLVM
118 nodist_EXTRA_pipe_r600_la_SOURCES = dummy.cpp
119 pipe_r600_la_LIBADD += $(LLVM_LIBS)
120 endif
121 endif
122
123 if HAVE_GALLIUM_RADEONSI
124 pipe_LTLIBRARIES += pipe_radeonsi.la
125 pipe_radeonsi_la_SOURCES = pipe_radeonsi.c
126 nodist_EXTRA_pipe_radeonsi_la_SOURCES = dummy.cpp
127 pipe_radeonsi_la_LIBADD = \
128 $(PIPE_LIBS) \
129 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
130 $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
131 $(LIBDRM_LIBS) \
132 $(RADEON_LIBS)
133
134 if HAVE_MESA_LLVM
135 pipe_radeonsi_la_LIBADD += $(LLVM_LIBS)
136 endif
137 endif
138
139 if HAVE_GALLIUM_FREEDRENO
140 pipe_LTLIBRARIES += pipe_msm.la
141 pipe_msm_la_SOURCES = pipe_msm.c
142 nodist_EXTRA_pipe_msm_la_SOURCES = dummy.cpp
143 pipe_msm_la_LIBADD = \
144 $(PIPE_LIBS) \
145 $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
146 $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
147 $(LIBDRM_LIBS) \
148 $(FREEDRENO_LIBS)
149
150 if HAVE_MESA_LLVM
151 pipe_msm_la_LIBADD += $(LLVM_LIBS)
152 endif
153 endif
154
155 if HAVE_GALLIUM_SVGA
156 pipe_LTLIBRARIES += pipe_vmwgfx.la
157 pipe_vmwgfx_la_SOURCES = pipe_vmwgfx.c
158 pipe_vmwgfx_la_LIBADD = \
159 $(PIPE_LIBS) \
160 $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
161 $(top_builddir)/src/gallium/drivers/svga/libsvga.la \
162 $(LIBDRM_LIBS)
163
164 if HAVE_MESA_LLVM
165 nodist_EXTRA_pipe_vmwgfx_la_SOURCES = dummy.cpp
166 pipe_vmwgfx_la_LIBADD += $(LLVM_LIBS)
167 endif
168 endif
169
170 if HAVE_GALLIUM_SOFTPIPE
171 AM_CPPFLAGS += -DGALLIUM_SOFTPIPE
172
173 pipe_LTLIBRARIES += pipe_swrast.la
174 pipe_swrast_la_SOURCES = pipe_swrast.c
175 pipe_swrast_la_LIBADD = \
176 $(PIPE_LIBS) \
177 $(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la
178
179 if HAVE_GALLIUM_LLVMPIPE
180 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
181
182 nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
183
184 pipe_swrast_la_LIBADD += \
185 $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la \
186 $(LLVM_LIBS)
187 endif
188 endif