Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / mit / xorg / lib / libGL / Makefile
bloba15d99400e84bd5d362f091883f7ad6e8fa0f3d4
1 # $NetBSD: Makefile,v 1.9 2009/06/11 15:25:53 mrg Exp $
3 .include <bsd.own.mk>
5 LIB= GL
7 # glx
8 .PATH: ${X11SRCDIR.MesaLib}/src/glx/x11
9 SRCS.glx= glcontextmodes.c clientattrib.c compsize.c eval.c glxcmds.c \
10 glxext.c glxextensions.c indirect.c indirect_init.c \
11 indirect_size.c indirect_window_pos.c \
12 indirect_transpose_matrix.c indirect_vertex_array.c \
13 indirect_vertex_program.c pixel.c pixelstore.c render2.c \
14 renderpix.c single2.c singlepix.c vertarr.c xfont.c \
15 glx_pbuffer.c glx_query.c \
16 glxcurrent.c indirect_texture_compression.c
18 .PATH: ${X11SRCDIR.MesaLib}/src/mesa/glapi
19 SRCS.glx+= glapi.c glapi_getproc.c glthread.c
21 # XXX see TODO
22 #.if ${MACHINE_ARCH} == "i386"
23 #.PATH: ${X11SRCDIR.MesaLib}/src/mesa/x86
24 #SRCS.glx+= glapi_x86.S
25 #CPPFLAGS+= -DUSE_X86_ASM -I${X11SRCDIR.MesaLib}/src/mesa/x86
26 ## -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(SSE_DEFS)
27 #.endif
30 .if ${X11DRI} != "no"
31 # dri
32 SRCS.dri= XF86dri.c dri_glx.c drisw_glx.c dri_common.c \
33 glxhash.c dri2_glx.c dri2.c
34 .for fn in ${SRCS.dri}
35 CPPFLAGS.${fn}=-DDEFAULT_DRIVER_DIR=\"${X11USRLIBDIR}/modules/dri\"
36 .endfor
37 .endif
40 # mesa
41 .PATH: ${X11SRCDIR.MesaLib}/src/mesa/main
42 SRCS.mesa= dispatch.c
45 .PATH: ${X11SRCDIR.MesaLib}/src/glw
46 .PATH: ${X11SRCDIR.MesaLib}/include/GL
47 .PATH: ${X11SRCDIR.MesaLib}/src/mesa/drivers/x11
48 INCS= GLwDrawA.h GLwDrawAP.h GLwMDrawA.h GLwMDrawAP.h gl.h gl_mangle.h \
49 glext.h glx.h glx_mangle.h glxext.h xmesa.h xmesa_x.h \
50 xmesa_xf86.h
51 INCSDIR=${X11INCDIR}/GL
53 SRCS+= ${SRCS.dri} ${SRCS.mesa} ${SRCS.glx}
55 CPPFLAGS+= -I${DESTDIR}${X11INCDIR}/GL \
56 -I${DESTDIR}${X11INCDIR}/X11 \
57 -I${DESTDIR}${X11INCDIR}/X11/extensions \
58 -I${DESTDIR}${X11INCDIR}/drm \
59 -I${X11SRCDIR.MesaLib}/include \
60 -I${X11SRCDIR.MesaLib}/include/GL/internal \
61 -I${X11SRCDIR.MesaLib}/src/mesa \
62 -I${X11SRCDIR.MesaLib}/src/mesa/glapi \
63 -I${X11SRCDIR.MesaLib}/src/mesa \
64 ${X11FLAGS.THREADLIB}
66 # -I${X11SRCDIR.dri2proto}/src/mesa \
68 CFLAGS+= -fno-strict-aliasing -fvisibility=hidden -pthread
69 CPPFLAGS+= -DUSE_SSE_SYSCTL_DETECTION \
70 -D__GLX_ALIGN64 \
71 -DMESA_EXECMEM_MMAP \
72 -DEXEC_HEAP_SIZE=10485760 \
73 -D_NETBSD_SOURCE \
74 -DUSE_NATIVE_LIBM_FUNCS \
75 -DPTHREADS \
76 -DUSE_EXTERNAL_DXTN_LIB=1 \
77 -DIN_DRI_DRIVER \
78 -DGLX_DIRECT_RENDERING \
79 -DGLX_INDIRECT_RENDERING \
80 -DHZ=100 \
81 -DHAVE_ALIAS \
82 -DXF86VIDMODE \
83 -UIN_DRI_DRIVER
85 LIBDPLIBS= Xext ${.CURDIR}/../libXext \
86 X11 ${.CURDIR}/../libX11/dynamic \
87 Xxf86vm ${.CURDIR}/../libXxf86vm \
88 Xfixes ${.CURDIR}/../libXfixes \
89 Xdamage ${.CURDIR}/../libXdamage \
90 drm ${.CURDIR}/../libdrm \
91 m ${.CURDIR}/../../../../../lib/libm
93 # XXX XXX
94 COPTS.dri_glx.c= -Wno-error
95 COPTS.glxext.c= -Wno-error
96 COPTS.indirect_vertex_program.c= -Wno-error
97 MKLINT=no
99 PKGCONFIG= gl
100 PKGDIST.gl= ${X11SRCDIR.MesaLib}/src/mesa
101 PKGCONFIG_VERSION.gl= 7.4.2
103 .include <bsd.x11.mk>
104 .include <bsd.lib.mk>