1 # $NetBSD: Makefile,v 1.26 2015/01/05 18:51:10 gson Exp $
3 # Link the mesa_dri_drivers mega driver.
7 .if
${MACHINE_ARCH} == "i386" ||
${MACHINE_ARCH} == "x86_64"
15 DRIDIR
= ${X11USRLIBDIR}/modules
/dri
16 DRIDEBUGDIR
= ${DEBUGDIR}${X11USRLIBDIR}/modules
/dri
18 # -I${X11SRCDIR.MesaLib}/src/mesa/drivers/dri/${MODULE}/server \
21 -I
${X11SRCDIR.MesaLib
}/src
/egl
/main \
22 -I
${X11SRCDIR.MesaLib
}/src
/egl
/drivers
/dri \
23 -I
${X11SRCDIR.MesaLib
}/..
/src
/mesa
/drivers
/dri
/common \
24 -I
${DESTDIR}${X11INCDIR}/libdrm
26 #CPPFLAGS+= -D_NETBSD_SOURCE -DPTHREADS
28 CPPFLAGS
+= -DHAVE_PTHREAD
=1
31 CWARNFLAGS.clang
+= -Wno-\
#warnings
33 CWARNFLAGS.clang
+= -Wno-attributes
34 .
endif # defined(__MINIX)
37 # We don't actually build this on non-x86 at all, currently.
38 # The following if statements are not effective since we only
40 .if
${MACHINE_ARCH} == "alpha"
42 .elif
${MACHINE} == "macppc" ||
${MACHINE} == "ofppc"
44 .elif
${MACHINE_ARCH} == "sparc64" ||
${MACHINE_ARCH} == "sparc"
46 .elif
${MACHINE_ARCH} == "i386" ||
${MACHINE_ARCH} == "x86_64"
47 DRIVERS
= i915 i965 r200 radeon
48 .elif
${MACHINE} == "prep" ||
${MACHINE} == "bebox"
52 DRI_SUBDIRS
= ${DRIVERS}
72 intel_buffer_objects.c \
79 intel_tex_subimage.c \
81 intel_tex_validate.c \
84 intel_pixel_bitmap.c \
97 .for _f in
${I915_INTEL_FILES}
98 BUILDSYMLINKS
+= ${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/i915
/${_f} i915_
${_f}
99 DRI_SOURCES.i915
+= i915_
${_f}
100 CPPFLAGS.i915_
${_f}+= -I
${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/i915
104 brw_binding_tables.c \
107 brw_blorp_blit_eu.
cpp \
116 brw_clip_unfilled.c \
119 brw_cubemap_normalize.
cpp \
121 brw_dead_control_flow.
cpp \
131 brw_fs_channel_expressions.
cpp \
132 brw_fs_copy_propagation.
cpp \
134 brw_fs_dead_code_eliminate.
cpp \
136 brw_fs_generator.
cpp \
137 brw_fs_live_variables.
cpp \
138 brw_fs_peephole_predicated_break.
cpp \
139 brw_fs_reg_allocate.
cpp \
140 brw_fs_register_coalesce.
cpp \
141 brw_fs_saturate_propagation.
cpp \
142 brw_fs_sel_peephole.
cpp \
143 brw_fs_vector_splitting.
cpp \
148 brw_gs_surface_state.c \
152 brw_gs_surface_state.c \
153 brw_interpolation_map.c \
154 brw_lower_texture_gradients.
cpp \
155 brw_lower_unnormalized_offset.
cpp \
156 brw_meta_updownsample.c \
157 brw_meta_stencil_blit.c \
159 brw_meta_fast_clear.c \
161 brw_object_purgeable.c \
162 brw_performance_monitor.c \
164 brw_primitive_restart.c \
167 brw_sampler_state.c \
168 brw_schedule_instructions.
cpp \
177 brw_surface_formats.c \
183 brw_vec4_copy_propagation.
cpp \
185 brw_vec4_generator.
cpp \
187 brw_vec4_gs_visitor.
cpp \
188 brw_vec4_live_variables.
cpp \
189 brw_vec4_reg_allocate.
cpp \
190 brw_vec4_visitor.
cpp \
192 brw_vec4_vs_visitor.
cpp \
195 brw_vs_surface_state.c \
199 brw_wm_surface_state.c \
204 gen6_depthstencil.c \
206 gen6_multisample_state.c \
208 gen6_sampler_state.c \
209 gen6_scissor_state.c \
212 gen6_surface_state.c \
214 gen6_viewport_state.c \
224 gen7_viewport_state.c \
227 gen7_wm_surface_state.c \
234 gen8_multisample_state.c \
237 gen8_surface_state.c \
238 gen8_viewport_state.c \
240 gen8_wm_depth_stencil.c \
244 intel_asm_annotation.c \
245 intel_batchbuffer.c \
247 intel_buffer_objects.c \
253 intel_mipmap_tree.c \
254 intel_resolve_map.c \
257 intel_pixel_bitmap.c \
266 intel_tex_subimage.c \
267 intel_tex_validate.c \
270 .for _f in
${I965_INTEL_FILES}
271 BUILDSYMLINKS
+= ${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/i965
/${_f} i965_
${_f}
272 DRI_SOURCES.i965
+= i965_
${_f}
273 CPPFLAGS.i965_
${_f} += -I
${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/i965
293 radeon_buffer_objects.c \
294 radeon_common_context.c \
300 radeon_mipmap_tree.c \
301 radeon_pixel_read.c \
309 .for _f in
${R200_RADEON_FILES}
310 BUILDSYMLINKS
+= ${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/radeon
/${_f} r200_
${_f}
311 DRI_SOURCES.r200
+= r200_
${_f}
314 .for _f in
${DRI_SOURCES.r200
}
315 CPPFLAGS.
${_f} += -I
${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/r200
/server \
316 -I
${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/r200 \
317 -I
${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/radeon
/server \
318 -I
${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/radeon \
322 DRI_SOURCES.radeon
= \
323 radeon_buffer_objects.c \
324 radeon_common_context.c \
330 radeon_mipmap_tree.c \
331 radeon_pixel_read.c \
341 radeon_state_init.c \
350 .for _f in
${DRI_SOURCES.radeon
}
351 CPPFLAGS.
${_f} += -I
${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/radeon
/server \
352 -I
${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/radeon \
356 .for _d in
${DRI_SUBDIRS}
357 SRCS
+= ${DRI_SOURCES.
${_d}}
358 .PATH
: ${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/${_d}
361 LIBDPLIBS
+= expat
${NETBSDSRCDIR}/external
/mit
/expat
/lib
/libexpat
362 LIBDPLIBS
+= m
${NETBSDSRCDIR}/lib
/libm
363 LIBDPLIBS
+= glapi
${.CURDIR
}/..
/libglapi
364 LIBDPLIBS
+= drm
${.CURDIR
}/..
/libdrm
365 .if
${MACHINE_ARCH} == "i386" ||
${MACHINE_ARCH} == "x86_64"
366 LIBDPLIBS
+= drm_intel
${.CURDIR
}/..
/libdrm_intel
368 LIBDPLIBS
+= drm_radeon
${.CURDIR
}/..
/libdrm_radeon
370 MESA_SRC_MODULES
= main math math_xform vbo tnl swrast ss common asm_c program asm_s
371 .
include "../libmesa.mk"
372 .
include "../libglsl.mk"
374 .if
${MACHINE_ARCH} == "i386" ||
${MACHINE_ARCH} == "x86_64"
375 SRCS
+= streaming-load-memcpy.c
376 CPPFLAGS.streaming-load-memcpy.c
+= -msse4.1
379 .
include "../driver.mk"
381 .for _d in
${DRIVERS}
382 SYMLINKS
+= mesa_dri_drivers.so.
${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so.
${SHLIB_MAJOR}
383 SYMLINKS
+= ${_d}_dri.so.
${SHLIB_MAJOR} ${DRIDIR}/${_d}_dri.so
384 .if
${MKDEBUG} != "no"
385 SYMLINKS
+= mesa_dri_drivers.so.
${SHLIB_MAJOR}.debug
${DRIDEBUGDIR}/${_d}_dri.so.
${SHLIB_MAJOR}.debug
392 PKGDIST.dri
= ${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
393 .
include "${.CURDIR}/../libGL/mesa-ver.mk"
394 PKGCONFIG_VERSION.dri
= ${MESA_VER}
396 # XXX remove these from bsd.x11.mk
397 PKGCONFIG_SED_FLAGS
= \
398 -e
"s,@DRI_DRIVER_INSTALL_DIR@,${X11USRLIBDIR}/modules/dri,; \
399 s,@DRI_PC_REQ_PRIV@,,"
404 .PATH
: ${X11SRCDIR.MesaLib
}/src
/mesa
/drivers
/dri
/common
406 .
include <bsd.x11.mk
>
407 .if
${MACHINE_ARCH} == "i386" ||
${MACHINE_ARCH} == "x86_64"
408 LIBDIR
= ${X11USRLIBDIR}/modules
/dri
410 CWARNFLAGS.clang
+= -Wno-error
=initializer-overrides
-Wno-error
=switch \
411 -Wno-error
=tautological-constant-out-of-range-compare
413 .
include <bsd.lib.mk
>
415 .
include <bsd.inc.mk
>
417 # Don't re-build .c files when .y files change