2012-06-04 04:18:45 -06:00
|
|
|
# $OpenBSD: Makefile,v 1.30 2012/06/04 10:18:45 mpi Exp $
|
2008-03-25 17:41:50 -06:00
|
|
|
.include <bsd.xconf.mk>
|
2008-02-02 10:24:30 -07:00
|
|
|
|
2008-03-25 17:41:50 -06:00
|
|
|
.if ${XENOCARA_BUILD_DRI:L} == "yes"
|
2011-10-23 07:57:36 -06:00
|
|
|
SUBDIR=glsl libmesa dri
|
2008-02-02 10:24:30 -07:00
|
|
|
.endif
|
2006-11-26 04:21:13 -07:00
|
|
|
|
|
|
|
LIB= GL
|
|
|
|
|
|
|
|
MESA= ${.CURDIR}/../../dist/Mesa/src/mesa
|
2011-10-23 07:57:36 -06:00
|
|
|
MAPI= ${.CURDIR}/../../dist/Mesa/src/mapi
|
|
|
|
GL= ${.CURDIR}/../../dist/Mesa/Mesa/src/GL
|
2010-05-22 14:14:14 -06:00
|
|
|
GLX= ${.CURDIR}/../../dist/Mesa/src/glx
|
2006-11-26 04:21:13 -07:00
|
|
|
MESA_INCLUDE= ${.CURDIR}/../../dist/Mesa/include
|
2008-11-02 08:01:32 -07:00
|
|
|
MESA_DRI= ${.CURDIR}/../../dist/Mesa/src/mesa/drivers/dri
|
2006-11-26 04:21:13 -07:00
|
|
|
|
2008-02-12 14:09:25 -07:00
|
|
|
MESA_MAJOR= 7
|
2011-10-23 07:57:36 -06:00
|
|
|
MESA_MINOR= 10
|
|
|
|
MESA_TINY= 3
|
2008-02-12 14:09:25 -07:00
|
|
|
|
2007-11-24 10:46:55 -07:00
|
|
|
DRI_DRIVER_INSTALL_DIR= ${X11BASE}/lib/modules/dri
|
|
|
|
|
|
|
|
DRI_DRIVER_SEARCH_DIR= $(DRI_DRIVER_INSTALL_DIR)
|
|
|
|
|
2006-11-26 04:21:13 -07:00
|
|
|
INCSDIR= ${X11BASE}/include/GL
|
2008-02-02 10:38:56 -07:00
|
|
|
|
2008-03-25 17:41:50 -06:00
|
|
|
.if ${XENOCARA_BUILD_DRI:L} == "yes"
|
2011-10-23 07:57:36 -06:00
|
|
|
LDADD= -L${X11BASE}/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
|
|
|
-ldrm -lstdc++ -lm -lc
|
2008-02-02 10:38:56 -07:00
|
|
|
.else
|
2011-10-23 07:57:36 -06:00
|
|
|
LDADD= -L${X11BASE}/lib -lX11 -lXext
|
2008-02-02 10:38:56 -07:00
|
|
|
.endif
|
2006-11-26 04:21:13 -07:00
|
|
|
|
|
|
|
CPP= cpp -notraditional
|
2007-04-07 09:37:50 -06:00
|
|
|
DEBUG?=
|
2006-11-26 04:21:13 -07:00
|
|
|
|
|
|
|
CPPFLAGS+= \
|
|
|
|
-I. \
|
|
|
|
-I${MESA_INCLUDE} \
|
2007-11-24 10:46:55 -07:00
|
|
|
-I${MESA_INCLUDE}/GL/internal \
|
2006-11-26 04:21:13 -07:00
|
|
|
-I${MESA} \
|
2011-10-23 07:57:36 -06:00
|
|
|
-I${MAPI} \
|
|
|
|
-I${MAPI}/glapi \
|
2006-11-26 04:21:13 -07:00
|
|
|
-I${GLX} \
|
|
|
|
-I${X11BASE}/include \
|
2009-01-10 09:06:51 -07:00
|
|
|
-I/usr/include/dev/pci/drm \
|
2007-11-25 03:18:21 -07:00
|
|
|
-DGLX_INDIRECT_RENDERING \
|
2007-11-26 08:10:19 -07:00
|
|
|
-DPTHREADS \
|
2007-11-24 10:46:55 -07:00
|
|
|
-DHAVE_ALIAS \
|
2012-06-04 04:18:45 -06:00
|
|
|
-D_REENTRANT \
|
|
|
|
-DMAPI_GLAPI_CURRENT
|
2006-11-26 04:21:13 -07:00
|
|
|
|
2008-03-25 17:41:50 -06:00
|
|
|
.if ${XENOCARA_BUILD_DRI:L} == "yes"
|
2012-06-04 04:18:45 -06:00
|
|
|
CPPFLAGS+= \
|
2011-10-23 07:57:36 -06:00
|
|
|
-DGLX_DIRECT_RENDERING -DXF86VIDMODE \
|
2008-11-02 08:01:32 -07:00
|
|
|
-DDEFAULT_DRIVER_DIR=\"${DRI_DRIVER_INSTALL_DIR}\"
|
2008-02-02 10:24:30 -07:00
|
|
|
.endif
|
|
|
|
|
2006-11-26 04:21:13 -07:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
|
|
CPPFLAGS += \
|
|
|
|
-DUSE_X86_ASM \
|
|
|
|
-DUSE_MMX_ASM \
|
|
|
|
-DUSE_3DNOW_ASM \
|
|
|
|
-DUSE_SSE_ASM
|
|
|
|
.elif ${MACHINE_ARCH} == "amd64"
|
2007-11-24 10:46:55 -07:00
|
|
|
CPPFLAGS += -D__GLX_ALIGN64 -DUSE_X86_64_ASM
|
2006-11-26 04:21:13 -07:00
|
|
|
.endif
|
|
|
|
|
|
|
|
INCS= \
|
|
|
|
gl.h \
|
|
|
|
glext.h \
|
|
|
|
glx.h \
|
|
|
|
glxext.h \
|
|
|
|
osmesa.h
|
|
|
|
|
|
|
|
GLAPI_SOURCES= \
|
2010-05-22 14:14:14 -06:00
|
|
|
glapi_dispatch.c \
|
2011-10-23 07:57:36 -06:00
|
|
|
glapi_entrypoint.c \
|
2009-05-17 14:20:23 -06:00
|
|
|
glapi_getproc.c \
|
2010-05-22 14:14:14 -06:00
|
|
|
glapi_nop.c \
|
2007-11-24 10:46:55 -07:00
|
|
|
glthread.c \
|
|
|
|
$(ASM_API)
|
2006-11-26 04:21:13 -07:00
|
|
|
|
2007-11-24 10:46:55 -07:00
|
|
|
.if ${MACHINE_ARCH} == i386
|
2008-02-02 10:24:30 -07:00
|
|
|
ASM_API = glapi_x86.S
|
2007-11-24 10:46:55 -07:00
|
|
|
.endif
|
2008-02-02 10:24:30 -07:00
|
|
|
|
2007-11-24 10:46:55 -07:00
|
|
|
.if ${MACHINE_ARCH} == amd64
|
2008-02-02 10:24:30 -07:00
|
|
|
ASM_API = glapi_x86-64.S
|
2007-11-24 10:46:55 -07:00
|
|
|
.endif
|
2006-11-26 04:21:13 -07:00
|
|
|
|
2008-02-02 10:24:30 -07:00
|
|
|
.if ${MACHINE_ARCH} == sparc
|
|
|
|
SPARC_API = glapi_sparc.S
|
|
|
|
.endif
|
2007-11-24 10:46:55 -07:00
|
|
|
|
2006-11-26 04:21:13 -07:00
|
|
|
GLX_SOURCES= \
|
2007-11-24 10:46:55 -07:00
|
|
|
clientattrib.c \
|
|
|
|
compsize.c \
|
|
|
|
glxeval.c \
|
2011-10-23 07:57:36 -06:00
|
|
|
glxconfig.c \
|
2007-11-24 10:46:55 -07:00
|
|
|
glxcmds.c \
|
2008-11-02 08:01:32 -07:00
|
|
|
glxcurrent.c \
|
2007-11-24 10:46:55 -07:00
|
|
|
glxext.c \
|
|
|
|
glxextensions.c \
|
2011-10-23 07:57:36 -06:00
|
|
|
indirect_glx.c \
|
2007-11-24 10:46:55 -07:00
|
|
|
indirect.c \
|
|
|
|
indirect_init.c \
|
|
|
|
indirect_size.c \
|
|
|
|
indirect_window_pos.c \
|
2008-11-02 08:01:32 -07:00
|
|
|
indirect_texture_compression.c \
|
2007-11-24 10:46:55 -07:00
|
|
|
indirect_transpose_matrix.c \
|
|
|
|
indirect_vertex_array.c \
|
|
|
|
indirect_vertex_program.c \
|
|
|
|
glxpixel.c \
|
2009-05-17 14:20:23 -06:00
|
|
|
glxpixelstore.c \
|
2007-11-24 10:46:55 -07:00
|
|
|
render2.c \
|
|
|
|
renderpix.c \
|
|
|
|
single2.c \
|
|
|
|
singlepix.c \
|
|
|
|
vertarr.c \
|
|
|
|
xfont.c \
|
|
|
|
glx_pbuffer.c \
|
|
|
|
glx_query.c \
|
2008-11-02 08:01:32 -07:00
|
|
|
drisw_glx.c \
|
|
|
|
dri_common.c \
|
2007-11-24 10:46:55 -07:00
|
|
|
dri_glx.c \
|
2008-11-02 08:01:32 -07:00
|
|
|
XF86dri.c \
|
|
|
|
glxhash.c \
|
2009-05-17 14:20:23 -06:00
|
|
|
dri2_glx.c \
|
2011-10-23 07:57:36 -06:00
|
|
|
dri2.c \
|
|
|
|
applegl_glx.c
|
|
|
|
|
|
|
|
MAPI_GLAPI_SOURCES = \
|
|
|
|
u_current.c \
|
|
|
|
u_execmem.c \
|
|
|
|
u_thread.c
|
|
|
|
|
|
|
|
MAPI_SOURCES = \
|
|
|
|
entry.c \
|
|
|
|
mapi.c \
|
|
|
|
stub.c \
|
|
|
|
table.c \
|
|
|
|
$(MAPI_GLAPI_SOURCES)
|
2007-11-24 10:46:55 -07:00
|
|
|
|
|
|
|
SRCS = $(GLX_SOURCES) \
|
2011-10-23 07:57:36 -06:00
|
|
|
$(GLAPI_SOURCES) \
|
|
|
|
$(MAPI_GLAPI_SOURCES)
|
2006-11-26 04:21:13 -07:00
|
|
|
|
2008-11-02 08:01:32 -07:00
|
|
|
includes: _SUBDIRUSE
|
2006-11-26 04:21:13 -07:00
|
|
|
cd ${MESA_INCLUDE}/GL; for i in ${INCS}; do \
|
|
|
|
j="cmp -s $$i ${DESTDIR}${INCSDIR}/GL/$$i || \
|
2010-05-08 08:15:29 -06:00
|
|
|
${INSTALL_DATA} $$i ${DESTDIR}${INCSDIR}/GL"; \
|
2006-11-26 04:21:13 -07:00
|
|
|
echo "\tinstalling $$i"; \
|
|
|
|
eval "$$j"; \
|
|
|
|
done
|
|
|
|
|
2006-11-29 11:03:09 -07:00
|
|
|
NOPROFILE=
|
2006-11-26 04:21:13 -07:00
|
|
|
|
2006-12-02 09:28:48 -07:00
|
|
|
obj: _xenocara_obj
|
|
|
|
|
2006-11-26 04:21:13 -07:00
|
|
|
.include <bsd.lib.mk>
|
|
|
|
.include <bsd.xorg.mk>
|
|
|
|
|
2006-12-03 12:36:18 -07:00
|
|
|
.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == sparc
|
2006-11-26 04:21:13 -07:00
|
|
|
PICFLAG = -fPIC
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# name conflicts
|
|
|
|
glxeval.c: ${GLX}/eval.c
|
|
|
|
ln -s ${GLX}/eval.c $@
|
|
|
|
|
|
|
|
glxpixel.c: ${GLX}/pixel.c
|
|
|
|
ln -s ${GLX}/pixel.c $@
|
|
|
|
|
2009-05-17 14:20:23 -06:00
|
|
|
glxpixelstore.c: ${GLX}/pixelstore.c
|
|
|
|
ln -s ${GLX}/pixelstore.c $@
|
|
|
|
|
|
|
|
CLEANFILES+= glxeval.c glxpixel.c glxpixelstore.c
|
2006-11-26 04:21:13 -07:00
|
|
|
|
2008-02-12 14:09:25 -07:00
|
|
|
gl.pc: ${MESA}/gl.pc.in Makefile
|
|
|
|
sed -e 's,@INSTALL_DIR@,$(X11BASE),' \
|
2009-01-10 09:04:43 -07:00
|
|
|
-e 's,@INSTALL_LIB_DIR@,${LIBDIR},' \
|
|
|
|
-e 's,@INSTALL_INC_DIR@,${INCSDIR},' \
|
2011-10-23 07:57:36 -06:00
|
|
|
-e 's,@GL_PC_REQ_PRIV@,libdrm >= 2.4.15 dri2proto >= 2.1 glproto >= 1.4.11 x11 xext xdamage xfixes xxf86vm,' \
|
2009-05-17 14:20:23 -06:00
|
|
|
-e 's,@GL_PC_LIB_PRIV@,-L${LIBDIR} -lXxf86vm -lXext -lXdamage -lXfixes -lX11 -lXau -lXdmcp,' \
|
|
|
|
-e 's,@GL_PC_CFLAGS@,-I${INCSDIR},' \
|
2010-05-22 14:14:14 -06:00
|
|
|
-e 's,@GL_LIB@,GL,' \
|
2008-02-12 14:09:25 -07:00
|
|
|
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
|
|
|
|
< ${MESA}/gl.pc.in > gl.pc
|
|
|
|
|
2008-11-02 08:01:32 -07:00
|
|
|
.if ${XENOCARA_BUILD_DRI:L} == "yes"
|
|
|
|
DRI_PC=dri.pc
|
|
|
|
|
2009-01-10 09:04:43 -07:00
|
|
|
dri.pc: ${MESA_DRI}/dri.pc.in Makefile
|
2008-11-02 08:01:32 -07:00
|
|
|
sed -e 's,@INSTALL_DIR@,${X11BASE},' \
|
2009-01-10 09:04:43 -07:00
|
|
|
-e 's,@INSTALL_LIB_DIR@,${LIBDIR},' \
|
|
|
|
-e 's,@INSTALL_INC_DIR@,${INCSDIR},' \
|
|
|
|
-e 's,@DRI_DRIVER_DIR@,${DRI_DRIVER_INSTALL_DIR},' \
|
|
|
|
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
|
2011-10-23 07:57:36 -06:00
|
|
|
-e 's,@DRI_PC_REQ_PRIV@,libdrm >= 2.4.15,' \
|
2009-01-10 09:04:43 -07:00
|
|
|
< ${MESA_DRI}/dri.pc.in > dri.pc
|
2008-11-02 08:01:32 -07:00
|
|
|
.endif
|
|
|
|
|
|
|
|
afterinstall: gl.pc ${DRI_PC}
|
2008-02-12 14:09:25 -07:00
|
|
|
$(INSTALL) -c -m 644 -o root -g wheel gl.pc \
|
|
|
|
${DESTDIR}${LIBDIR}/pkgconfig
|
2008-11-02 08:01:32 -07:00
|
|
|
.if ${XENOCARA_BUILD_DRI:L} == "yes"
|
|
|
|
$(INSTALL) -c -m 644 -o root -g wheel dri.pc \
|
|
|
|
${DESTDIR}${LIBDIR}/pkgconfig
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CLEANFILES+= gl.pc ${DRI_PC}
|
2008-02-12 14:09:25 -07:00
|
|
|
|
2007-11-24 10:46:55 -07:00
|
|
|
.if ${MACHINE_ARCH} == i386
|
2006-11-26 04:21:13 -07:00
|
|
|
.PATH: ${MESA}/x86
|
|
|
|
.PATH: ${MESA}/x86/rtasm
|
2007-11-24 10:46:55 -07:00
|
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == powerpc
|
|
|
|
.PATH: ${MESA}/ppc
|
|
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == sparc
|
|
|
|
.PATH: ${MESA}/sparc
|
|
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == amd64
|
|
|
|
.PATH: ${MESA}/x86-64
|
|
|
|
.endif
|
2006-11-26 04:21:13 -07:00
|
|
|
.PATH: ${MESA}/main
|
2011-10-23 07:57:36 -06:00
|
|
|
.PATH: ${MAPI}/glapi
|
|
|
|
.PATH: ${MAPI}/mapi
|
2006-11-26 04:21:13 -07:00
|
|
|
.PATH: ${GLX}
|
2008-02-02 10:24:30 -07:00
|
|
|
|
|
|
|
.include <bsd.subdir.mk>
|