1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
# $OpenBSD: Makefile,v 1.1 2024/07/19 14:40:46 rsadowski Exp $
LIB= gallium_drv_video
NOPROFILE=
SRCS= target.c
.include "../Makefile.inc"
CFLAGS+= ${C_VIS_ARGS}
CXXFLAGS+= ${CXX_VIS_ARGS}
CPPFLAGS+= -I${MESA_SRC}/src/gallium/include \
-I${MESA_SRC}/src/gallium/auxiliary \
-I${MESA_SRC}/src/gallium/drivers \
-I${MESA_SRC}/src/gallium/frontends/dri \
-I${MESA_SRC}/src/gallium/frontends/va \
-I${MESA_SRC}/src/gallium/winsys \
-I${MESA_SRC}/src/mesa \
-I${MESA_SRC}/src/mesa/drivers/dri/common \
-I${MESA_SRC}/generated/src/util \
-I${MESA_SRC}/generated/src/gallium/drivers \
-DGALLIUM_SOFTPIPE
obj: _xenocara_obj
.include <bsd.lib.mk>
.include <bsd.xorg.mk>
.if ${WITH_GALLIUM_R600} == "yes"
GALLIUM_DRIVERS+= r600
CPPFLAGS+= -DGALLIUM_R600
.endif
.if ${WITH_GALLIUM_RADEONSI} == "yes"
GALLIUM_DRIVERS+= radeonsi
CPPFLAGS+= -DGALLIUM_RADEONSI
.endif
.if ${WITH_LLVM} == "yes"
CPPFLAGS+= -DGALLIUM_LLVMPIPE
.endif
install:
.for driver in ${GALLIUM_DRIVERS}
${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} \
-o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
lib${LIB}.so ${DESTDIR}${X11BASE}/lib/modules/drivers/${driver}_drv_video.so
.endfor
SLIBS+= libdri \
libmesa \
libglsl \
libglcpp \
libmesa_util \
libmesa_format \
libmesa_util_sse41 \
libblake3 \
libmesa_util_c11 \
libnir \
libcompiler \
libgalliumvl \
libgallium \
libpipe_loader_static \
libloader \
libxmlconfig \
libws_null \
libwsw \
libswdri \
libswkmsdri \
libsoftpipe \
libvtn
.if ${WITH_SSE41} == "yes"
SLIBS+= libmesa_sse41
.endif
.if ${WITH_GALLIUM_R300} == "yes" || ${WITH_GALLIUM_R600} == "yes" || \
${WITH_GALLIUM_RADEONSI} == "yes"
SLIBS+= libradeonwinsys
.endif
LDADD+= -Wl,--as-needed -Wl,--allow-shlib-undefined -Wl,--whole-archive -Wl,--start-group
.if ${WITH_VAAPI} == "yes"
LDADD+= ${.CURDIR}/../libva_st/${__objdir}/libva_st.a -Wl,--no-whole-archive -Wl,-z,origin
.endif
.if ${WITH_GALLIUM_R600} == "yes"
SLIBS+= libr600
.endif
.if ${WITH_GALLIUM_RADEONSI} == "yes"
SLIBS+= libamdgpuwinsys \
libaddrlib \
libamd_common \
libamd_common_llvm \
libaco \
libradeonsi_gfx6 \
libradeonsi_gfx7 \
libradeonsi_gfx8 \
libradeonsi_gfx9 \
libradeonsi_gfx10 \
libradeonsi_gfx103 \
libradeonsi_gfx11 \
libradeonsi_gfx115 \
libradeonsi
.endif
.if ${WITH_LLVM} == "yes"
SLIBS+= libllvmpipe
.endif
.for slib in ${SLIBS}
LDADD+= ${.CURDIR}/../${slib}/${__objdir}/${slib}.a
.endfor
LDADD+= -L${.CURDIR}/../libglapi/${__objdir} -lglapi
LDADD+= -lelf -lLLVM -lexpat -lz -lm -lpthread
LDADD+= -L${X11BASE}/lib -ldrm
LDADD+= -lxshmfence
LDADD+= -lxcb-present -lxcb-xfixes -lX11-xcb -lxcb -lxcb-sync
LDADD+= -lxcb-dri3 -lxcb-randr -lxcb-dri2
.if ${WITH_GALLIUM_R300} == "yes" || ${WITH_GALLIUM_R600} == "yes"
LDADD+= -ldrm_radeon
.endif
.if ${WITH_GALLIUM_RADEONSI} == "yes"
LDADD+= -ldrm_amdgpu
.endif
LDADD+= ${BUILD_ID_SHA1} -Wl,--gc-sections \
-Wl,--version-script ${MESA_SRC}/src/gallium/targets/va/va.sym
.if ${WITH_LD_DYNAMIC_LIST} == "yes"
LDADD+= -Wl,--dynamic-list ${MESA_SRC}/src/gallium/targets/dri.dyn
.endif
LDADD+= -Wl,--end-group
all: lib${LIB}.so
lib${LIB}.so: ${SOBJS} ${DPADD}
${CXX} -shared -Wl,-soname,lib${LIB}.so ${PICFLAG} -o ${.TARGET} \
`echo ${SOBJS} | tr ' ' '\n' | sort -R` ${LDADD}
CLEANFILES+= lib${LIB}.so
.PATH: ${MESA_SRC}/src/gallium/targets/va/
|