summaryrefslogtreecommitdiff
path: root/lib/libepoxy/Makefile
blob: 3986deb89d9324004b26e33520707a14dffee61b (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
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
# $OpenBSD: Makefile,v 1.4 2016/09/01 10:37:40 jsg Exp $
.include <bsd.xconf.mk>

EPOXY=	${.CURDIR}/../../dist/libepoxy

LIB=	epoxy

EPOXY_MAJOR=	1
EPOXY_MINOR=	3
EPOXY_TINY=	1

INCSDIR=	${X11BASE}/include/epoxy

CFLAGS+= -std=gnu99

CPPFLAGS+= \
	-I${.CURDIR}/generated/include \
	-I${EPOXY}/include \
	-I${EPOXY}/src \
	-I${X11BASE}/include \
	-DPLATFORM_HAS_GLX \
	-DPLATFORM_HAS_EGL

SRCS=	dispatch_common.c \
	dispatch_glx.c \
	dispatch_egl.c \
	gl_generated_dispatch.c \
	glx_generated_dispatch.c \
	egl_generated_dispatch.c

INCS=	gl.h \
	glx.h \
	egl.h

GINCS=	gl_generated.h \
	glx_generated.h \
	egl_generated.h

includes: _SUBDIRUSE
	cd ${EPOXY}/include/epoxy; for i in ${INCS}; do \
	    j="cmp -s $$i ${DESTDIR}${INCSDIR}/epoxy/$$i || \
		${INSTALL_DATA}	$$i ${DESTDIR}${INCSDIR}/epoxy"; \
		echo "\tinstalling $$i"; \
		eval "$$j"; \
	done
	cd ${.CURDIR}/generated/include/epoxy; for i in ${GINCS}; do \
	    j="cmp -s $$i ${DESTDIR}${INCSDIR}/epoxy/$$i || \
		${INSTALL_DATA}	$$i ${DESTDIR}${INCSDIR}/epoxy"; \
		echo "\tinstalling $$i"; \
		eval "$$j"; \
	done

NOPROFILE=

obj: _xenocara_obj

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

epoxy.pc: ${EPOXY}/epoxy.pc.in Makefile
	sed -e 's,@prefix@,$(X11BASE),' \
	    -e 's,@exec_prefix@,$(X11BASE),' \
	    -e 's,@libdir@,${LIBDIR},' \
	    -e 's,@includedir@,${INCSDIR},' \
	    -e 's,@DLOPEN_LIBS@,,' \
	    -e 's,@PACKAGE_VERSION@,$(EPOXY_MAJOR).$(EPOXY_MINOR),' \
	< ${EPOXY}/epoxy.pc.in > epoxy.pc

afterinstall: epoxy.pc
	$(INSTALL) -c -m 644 -o root -g wheel epoxy.pc \
		${DESTDIR}${LIBDIR}/pkgconfig

CLEANFILES+= epoxy.pc

.PATH: ${EPOXY}/src
.PATH: ${.CURDIR}/generated/src