xref: /minix/external/mit/xorg/lib/libGLU/Makefile (revision ebfedea0)
1#	$NetBSD: Makefile,v 1.12 2013/09/12 17:14:20 joerg Exp $
2
3NOLINT=		1	# XTODO: tess.ln SIGSEGVs lint :(
4
5.include <bsd.own.mk>
6
7LIB=		GLU
8LIBISCXX=	yes
9
10GLUDIR=		${X11SRCDIR.MesaLib}/src/glu/sgi
11
12SRCS.libutil=	error.c glue.c mipmap.c project.c quad.c registry.c
13.PATH:		${GLUDIR}/libutil
14
15SRCS.libtess=	dict.c geom.c memalloc.c mesh.c normal.c priorityq.c \
16		render.c sweep.c tess.c tessmono.c
17.PATH:		${GLUDIR}/libtess
18
19SRCS.interface=	bezierEval.cc bezierPatch.cc bezierPatchMesh.cc \
20		glcurveval.cc glinterface.cc glrenderer.cc \
21		glsurfeval.cc incurveeval.cc insurfeval.cc
22.PATH:		${GLUDIR}/libnurbs/interface
23.for fn in ${SRCS.interface}
24CPPFLAGS.${fn}+=-I${GLUDIR}/libnurbs/internals \
25		-I${GLUDIR}/libnurbs/nurbtess \
26		-DLIBRARYBUILD
27.endfor
28
29SRCS.internals=	arc.cc arcsorter.cc arctess.cc backend.cc \
30		basiccrveval.cc basicsurfeval.cc bin.cc bufpool.cc \
31		cachingeval.cc ccw.cc coveandtiler.cc curve.cc \
32		curvelist.cc curvesub.cc dataTransform.cc displaylist.cc \
33		flist.cc flistsorter.cc hull.cc intersect.cc \
34		knotvector.cc mapdesc.cc mapdescv.cc maplist.cc \
35		mesher.cc monoTriangulationBackend.cc monotonizer.cc \
36		mycode.cc nurbsinterfac.cc nurbstess.cc patch.cc \
37		patchlist.cc quilt.cc reader.cc renderhints.cc \
38		slicer.cc sorter.cc splitarcs.cc subdivider.cc \
39		tobezier.cc trimline.cc trimregion.cc trimvertpool.cc \
40		uarray.cc varray.cc
41.PATH:		${GLUDIR}/libnurbs/internals
42.for fn in ${SRCS.internals}
43CPPFLAGS.${fn}+=-I${GLUDIR}/libnurbs/internals \
44		-I${GLUDIR}/libnurbs/nurbtess \
45		-I${GLUDIR}/libutil \
46		-DLIBRARYBUILD -D_EXTENSIONS_
47.endfor
48
49SRCS.nurbtess=	directedLine.cc gridWrap.cc monoChain.cc monoPolyPart.cc \
50		monoTriangulation.cc partitionX.cc partitionY.cc \
51		polyDBG.cc polyUtil.cc primitiveStream.cc quicksort.cc \
52		rectBlock.cc sampleComp.cc sampleCompBot.cc \
53		sampleCompRight.cc sampleCompTop.cc sampleMonoPoly.cc \
54		sampledLine.cc searchTree.cc
55.PATH:		${GLUDIR}/libnurbs/nurbtess
56.for fn in ${SRCS.nurbtess}
57CPPFLAGS.${fn}+=-I${GLUDIR}/libnurbs/internals \
58		-I${GLUDIR}/libnurbs/nurbtess \
59		-DLIBRARYBUILD
60.endfor
61
62CPPFLAGS+=	-I${GLUDIR}/include
63.if !defined(__MINIX)
64CPPFLAGS+=	-DPTHREADS -DUSE_XSHM -DHZ=100 -DNDEBUG -DLIBRARYBUILD
65.else
66CPPFLAGS+=	-DUSE_XSHM -DHZ=100 -DNDEBUG -DLIBRARYBUILD
67.endif # !defined(__MINIX)
68
69SRCS=		${SRCS.libutil} ${SRCS.libtess} \
70		${SRCS.interface} ${SRCS.internals} ${SRCS.nurbtess}
71
72.if !defined(__MINIX)
73CFLAGS+=	-fno-strict-aliasing -fvisibility=hidden -pthread
74.else
75CFLAGS+=	-fno-strict-aliasing -fvisibility=hidden
76.endif # !defined(__MINIX)
77
78.PATH:		${X11SRCDIR.MesaLib}/include/GL
79INCS=	glu.h glu_mangle.h
80INCSDIR=${X11INCDIR}/GL
81
82LIBDPLIBS=	Xext	${.CURDIR}/../libXext \
83		X11	${.CURDIR}/../libX11/dynamic \
84		GL	${.CURDIR}/../libGL \
85		Xxf86vm	${.CURDIR}/../libXxf86vm \
86		Xfixes	${.CURDIR}/../libXfixes \
87		Xdamage	${.CURDIR}/../libXdamage \
88		drm	${.CURDIR}/../libdrm \
89		m	${NETBSDSRCDIR}/lib/libm
90
91PKGCONFIG=	glu
92PKGDIST.glu=	${X11SRCDIR.MesaLib}/src/glu
93.include "${.CURDIR}/../libGL/mesa-ver.mk"
94PKGCONFIG_VERSION.glu=	${MESA_VER}
95
96.include <bsd.x11.mk>
97.include <bsd.lib.mk>
98
99# XXX
100.if defined(HAVE_GCC) && ${HAVE_GCC} >= 45
101COPTS.arcsorter.cc+=	-Wno-error
102COPTS.sorter.cc+=	-Wno-error
103COPTS.tobezier.cc+=	-Wno-error
104.endif
105
106.if ${MACHINE_ARCH} == "m68000" || ${MACHINE_ARCH} == "m68k"
107COPTS.sampleCompTop.cc+=	-O0
108.endif
109
110CWARNFLAGS.clang+=	-Wno-parentheses
111