summaryrefslogtreecommitdiff
path: root/lib/mesa/mk/libgbm/Makefile
blob: 2487dc8f5f8d94cfe8bcb0ae6102cbf62880e4a7 (plain)
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
#	$OpenBSD: Makefile,v 1.10 2023/11/03 00:58:54 jsg Exp $

.include <bsd.xconf.mk>

LIB=	gbm

SRCS=	backend.c \
	gbm.c

.if ${XENOCARA_BUILD_DRI:L} == "yes"
SRCS+=	gbm_dri.c
.endif

.include "../Makefile.inc"

CFLAGS+=	${C_VIS_ARGS}
CPPFLAGS+=	-I${MESA_SRC}/src/gbm/main \
		-I${MESA_SRC}/src/gbm/backends/dri \
		-I${MESA_SRC}/src/loader \
		-DDEFAULT_BACKENDS_PATH=\"${X11BASE}/lib/gbm\"

LDADD+=	-Wl,--as-needed -Wl,--start-group \
	${.CURDIR}/../libloader/${__objdir}/libloader.a \
	${.CURDIR}/../libmesa_util/${__objdir}/libmesa_util.a \
	${.CURDIR}/../libmesa_format/${__objdir}/libmesa_format.a \
	${.CURDIR}/../libmesa_util_sse41/${__objdir}/libmesa_util_sse41.a \
	${.CURDIR}/../libmesa_util_c11/${__objdir}/libmesa_util_c11.a \
	${.CURDIR}/../libxmlconfig/${__objdir}/libxmlconfig.a \
	-Wl,--gc-sections \
	-lz -lm -lexpat -lpthread -lxcb-randr

.if ${XENOCARA_BUILD_DRI:L} == "yes"
LDADD+= -L${X11BASE}/lib -ldrm
.endif

LDADD+=	-Wl,--end-group

obj: _xenocara_obj

beforeinstall:
	rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.la

.include <bsd.lib.mk>
.include <bsd.xorg.mk>

.PATH:	${MESA_SRC}/src/gbm/main
.PATH:	${MESA_SRC}/src/gbm/backends/dri