summaryrefslogtreecommitdiff
path: root/lib/mesa/mk/libgbm/Makefile
blob: 301f6c05782ddc6aedc745bdec621b9ab49b75de (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
#	$OpenBSD: Makefile,v 1.4 2022/02/24 02:29:48 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}/../libxmlconfig/${__objdir}/libxmlconfig.a \
	-lz -lm -lexpat

.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