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