head	1.10;
access;
symbols
	netbsd-11-0-RC4:1.10
	netbsd-11-0-RC3:1.10
	netbsd-11-0-RC2:1.10
	netbsd-11-0-RC1:1.10
	perseant-exfatfs-base-20250801:1.10
	netbsd-11:1.10.0.4
	netbsd-11-base:1.10
	netbsd-10-1-RELEASE:1.9
	perseant-exfatfs-base-20240630:1.10
	perseant-exfatfs:1.10.0.2
	perseant-exfatfs-base:1.10
	netbsd-8-3-RELEASE:1.1.10.1
	netbsd-9-4-RELEASE:1.4
	netbsd-10-0-RELEASE:1.9
	netbsd-10-0-RC6:1.9
	netbsd-10-0-RC5:1.9
	netbsd-10-0-RC4:1.9
	netbsd-10-0-RC3:1.9
	netbsd-10-0-RC2:1.9
	netbsd-10-0-RC1:1.9
	netbsd-10:1.9.0.6
	netbsd-10-base:1.9
	netbsd-9-3-RELEASE:1.4
	cjep_sun2x-base1:1.9
	cjep_sun2x:1.9.0.4
	cjep_sun2x-base:1.9
	cjep_staticlib_x-base1:1.9
	netbsd-9-2-RELEASE:1.4
	cjep_staticlib_x:1.9.0.2
	cjep_staticlib_x-base:1.9
	netbsd-9-1-RELEASE:1.4
	phil-wifi-20200421:1.7
	phil-wifi-20200411:1.7
	is-mlppp:1.7.0.2
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	netbsd-8-2-RELEASE:1.1.10.1
	netbsd-9-0-RELEASE:1.4
	netbsd-9-0-RC2:1.4
	netbsd-9-0-RC1:1.4
	phil-wifi-20191119:1.5
	netbsd-9:1.4.0.2
	netbsd-9-base:1.4
	phil-wifi-20190609:1.4
	netbsd-8-1-RELEASE:1.1.10.1
	netbsd-8-1-RC1:1.1.10.1
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	netbsd-7-2-RELEASE:1.1.2.2
	pgoyette-compat-0728:1.2
	netbsd-8-0-RELEASE:1.1.10.1
	phil-wifi:1.2.0.4
	phil-wifi-base:1.2
	pgoyette-compat-0625:1.2
	netbsd-8-0-RC2:1.1.10.1
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	netbsd-8-0-RC1:1.1.10.1
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	netbsd-7-1-2-RELEASE:1.1.2.2
	pgoyette-compat:1.2.0.2
	pgoyette-compat-base:1.2
	netbsd-7-1-1-RELEASE:1.1.2.2
	matt-nb8-mediatek:1.1.10.1.0.2
	matt-nb8-mediatek-base:1.1.10.1
	perseant-stdc-iso10646:1.1.0.12
	perseant-stdc-iso10646-base:1.1
	netbsd-8:1.1.0.10
	netbsd-8-base:1.1
	prg-localcount2-base3:1.1
	prg-localcount2-base2:1.1
	prg-localcount2-base1:1.1
	prg-localcount2:1.1.0.8
	prg-localcount2-base:1.1
	pgoyette-localcount-20170426:1.1
	bouyer-socketcan-base1:1.1
	pgoyette-localcount-20170320:1.1
	netbsd-7-1:1.1.2.2.0.6
	netbsd-7-1-RELEASE:1.1.2.2
	netbsd-7-1-RC2:1.1.2.2
	netbsd-7-nhusb-base-20170116:1.1.2.2
	bouyer-socketcan:1.1.0.6
	bouyer-socketcan-base:1.1
	pgoyette-localcount-20170107:1.1
	netbsd-7-1-RC1:1.1.2.2
	pgoyette-localcount-20161104:1.1
	netbsd-7-0-2-RELEASE:1.1.2.2
	localcount-20160914:1.1
	netbsd-7-nhusb:1.1.2.2.0.4
	netbsd-7-nhusb-base:1.1.2.2
	pgoyette-localcount-20160806:1.1
	pgoyette-localcount-20160726:1.1
	pgoyette-localcount:1.1.0.4
	pgoyette-localcount-base:1.1
	netbsd-7-0-1-RELEASE:1.1.2.2
	netbsd-7-0:1.1.2.2.0.2
	netbsd-7-0-RELEASE:1.1.2.2
	netbsd-7-0-RC3:1.1.2.2
	netbsd-7-0-RC2:1.1.2.2
	netbsd-7-0-RC1:1.1.2.2
	netbsd-7:1.1.0.2;
locks; strict;
comment	@# @;


1.10
date	2023.07.16.22.20.54;	author rjs;	state Exp;
branches;
next	1.9;
commitid	LwwVfBPl8CeDS4xE;

1.9
date	2020.10.31.13.28.22;	author nia;	state Exp;
branches;
next	1.8;
commitid	7GJeu7lswa4xG3uC;

1.8
date	2020.09.16.18.19.24;	author nia;	state Exp;
branches;
next	1.7;
commitid	MTYAsnu9Fcy3KioC;

1.7
date	2020.02.23.02.02.32;	author joerg;	state Exp;
branches;
next	1.6;
commitid	igaV1PwnHAs2YJXB;

1.6
date	2020.01.31.20.58.18;	author jmcneill;	state Exp;
branches;
next	1.5;
commitid	dpcuVmX1xIIgZSUB;

1.5
date	2019.09.24.19.29.42;	author maya;	state Exp;
branches;
next	1.4;
commitid	rMw7xnt9djCGDiEB;

1.4
date	2019.03.10.10.51.58;	author mrg;	state Exp;
branches;
next	1.3;
commitid	gGHPV4SpzxwU8OeB;

1.3
date	2019.03.10.02.29.53;	author mrg;	state Exp;
branches;
next	1.2;
commitid	v9cy21Je6lIUmLeB;

1.2
date	2017.10.06.20.24.46;	author christos;	state Exp;
branches
	1.2.4.1;
next	1.1;
commitid	CxUYjVQAvfBW12aA;

1.1
date	2014.12.18.06.24.30;	author mrg;	state Exp;
branches
	1.1.2.1
	1.1.10.1;
next	;
commitid	piX5MfsAjDSmgu2y;

1.2.4.1
date	2019.06.10.22.02.41;	author christos;	state Exp;
branches;
next	1.2.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.2.4.2
date	2020.04.08.14.07.02;	author martin;	state Exp;
branches;
next	1.2.4.3;
commitid	Qli2aW9E74UFuA3C;

1.2.4.3
date	2020.04.13.08.02.33;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.1.2.1
date	2014.12.18.06.24.30;	author martin;	state dead;
branches;
next	1.1.2.2;
commitid	P7SGAjfX1jg9FS4y;

1.1.2.2
date	2015.01.05.21.23.50;	author martin;	state Exp;
branches;
next	;
commitid	P7SGAjfX1jg9FS4y;

1.1.10.1
date	2017.10.11.22.49.49;	author snj;	state Exp;
branches;
next	;
commitid	7avcFn3mxglxFGaA;


desc
@@


1.10
log
@Make most of MesaLib build.
@
text
@#	$NetBSD: Makefile,v 1.9 2020/10/31 13:28:22 nia Exp $

.include <bsd.own.mk>

LIB=		glapi
LIBISCXX=	yes

SHLIB_MAJOR=    1
SHLIB_MINOR=    0

# mapi
.PATH:		${X11SRCDIR.Mesa}/src/mapi
SRCS.mapi=	\
	mapi_glapi.c \
	shared_entry.c \
	stub.c \
	table.c \
	u_current.c \
	u_execmem.c

BUILDSYMLINKS+=	${X11SRCDIR.Mesa}/src/mapi/entry.c shared_entry.c

.for _f in ${SRCS.mapi}
CPPFLAGS.${_f}=	-DMAPI_MODE_GLAPI -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
.endfor

# above is shared/libglapi.la

SRCS+=	${SRCS.mapi} ${SRCS.mapi-glapi}

CPPFLAGS+= \
	-I${X11SRCDIR.Mesa}/include \
	-I${X11SRCDIR.Mesa}/src/mapi \
	-I${X11SRCDIR.Mesa}/src \
	-I${X11SRCDIR.Mesa}/../src/mapi \
	-I${X11SRCDIR.Mesa}/../src/mapi/glapi

CPPFLAGS+=	${X11FLAGS.THREADLIB}

.include "${.CURDIR}/../libGL/mesa-ver.mk"

CFLAGS+=	-fno-strict-aliasing -fvisibility=hidden -pthread -fno-builtin-memcmp

CPPFLAGS+=	\
	-DPACKAGE_NAME=\"Mesa\" \
	-DPACKAGE_TARNAME=\"mesa\" \
	-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
	-DPACKAGE_VERSION=\"${MESA_VER}\" \
	-DPACKAGE_STRING=\"Mesa\ ${MESA_VER}\" \
	-DVERSION=\"${MESA_VER}\" \
	-DPACKAGE_URL=\"\" \
	-DPACKAGE=\"mesa\" \
	-D__STDC_CONSTANT_MACROS \
	-D__STDC_FORMAT_MACROS \
	-D__STDC_LIMIT_MACROS \
	-DUSE_GCC_ATOMIC_BUILTINS \
	-DNDEBUG \
	-DHAVE_SYS_SYSCTL_H \
	-DHAVE_DLFCN_H \
	-DHAVE_STRTOF \
	-DHAVE_MKOSTEMP \
	-DHAVE_TIMESPEC_GET \
	-DHAVE_STRTOD_L \
	-DHAVE_DL_ITERATE_PHDR \
	-DHAVE_POSIX_MEMALIGN \
	-DHAVE_ZLIB \
	-DHAVE_LIBDRM \
	-DGLX_USE_DRM \
	-DGLX_INDIRECT_RENDERING \
	-DGLX_DIRECT_RENDERING \
	-DGLX_USE_TLS \
	-DHAVE_X11_PLATFORM \
	-DHAVE_DRM_PLATFORM \
	-DENABLE_SHADER_CACHE \
	-DHAVE_MINCORE \
	-DMESA_LLVM_VERSION_PATCH=0 \
	-I. \
	-DSTDC_HEADERS=1 \
	-DHAVE_SYS_TYPES_H=1 \
	-DHAVE_SYS_STAT_H=1 \
	-DHAVE_STDLIB_H=1 \
	-DHAVE_STRING_H=1 \
	-DHAVE_MEMORY_H=1 \
	-DHAVE_STRINGS_H=1 \
	-DHAVE_INTTYPES_H=1 \
	-DHAVE_STDINT_H=1 \
	-DHAVE_UNISTD_H=1 \
	-DHAVE_DLFCN_H=1 \
	-DYYTEXT_POINTER=1 \
	-DHAVE___BUILTIN_BSWAP32=1 \
	-DHAVE___BUILTIN_BSWAP64=1 \
	-DHAVE___BUILTIN_CLZ=1 \
	-DHAVE___BUILTIN_CLZLL=1 \
	-DHAVE___BUILTIN_CTZ=1 \
	-DHAVE___BUILTIN_EXPECT=1 \
	-DHAVE___BUILTIN_FFS=1 \
	-DHAVE___BUILTIN_FFSLL=1 \
	-DHAVE___BUILTIN_POPCOUNT=1 \
	-DHAVE___BUILTIN_POPCOUNTLL=1 \
	-DHAVE___BUILTIN_UNREACHABLE=1 \
	-DHAVE_FUNC_ATTRIBUTE_CONST=1 \
	-DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 \
	-DHAVE_FUNC_ATTRIBUTE_FORMAT=1 \
	-DHAVE_FUNC_ATTRIBUTE_MALLOC=1 \
	-DHAVE_FUNC_ATTRIBUTE_PACKED=1 \
	-DHAVE_FUNC_ATTRIBUTE_PURE=1 \
	-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=1 \
	-DHAVE_FUNC_ATTRIBUTE_UNUSED=1 \
	-DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1 \
	-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 \
	-DHAVE_FUNC_ATTRIBUTE_WEAK=1 \
	-DHAVE_FUNC_ATTRIBUTE_ALIAS=1 \
	-DHAVE_FUNC_ATTRIBUTE_NORETURN=1 \
	-DHAVE_ENDIAN_H=1 \
	-DHAVE_DLADDR=1 \
	-DHAVE_CLOCK_GETTIME=1 \
	-DHAVE_PTHREAD_PRIO_INHERIT=1 \
	-DHAVE_PTHREAD=1

.include "../asm.mk"

MKLINT=no

#CWARNFLAGS.clang+=	-Wno-tautological-compare -Wno-format -Wno-constant-conversion

.include <bsd.x11.mk>
.include <bsd.lib.mk>
@


1.9
log
@mesa: re-enable GLX TLS to help i386

mesa's assembly code for i386 only seems to be position independent
when compiled with ELF TLS, so having it disabled causes worse problems
than the edge cases ELF TLS causes.

potentially the assembly code could be fixed (it looks like it not
being safe is a bug), it could also be disabled, but i don't currently
have the means to measure the impact of that.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2020/09/16 18:19:24 nia Exp $
d24 1
a24 1
CPPFLAGS.${_f}=	-DMAPI_MODE_GLAPI -DMAPI_ABI_HEADER=\"shared-glapi_glapi_mapi_tmp.h\"
@


1.8
log
@disable use of ELF TLS in Mesa/libGL

this is an optimization that primarily benefits linux/glibc -
most other systems have this disabled. in netbsd we've tried to
patch around it to make things work, but there still appears to be
some edge cases where libGL mysteriously crashes.

discussed on tech-x11 some time ago. already in place in pkgsrc.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2020/02/23 02:02:32 joerg Exp $
d71 1
@


1.7
log
@Doesn't need or use HAVE_LLVM.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2020/01/31 20:58:18 jmcneill Exp $
a70 1
	-DGLX_USE_TLS \
@


1.6
log
@Change HAVE_LLVM from 0x0700 to 0x0900.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2019/09/24 19:29:42 maya Exp $
a75 1
	-DHAVE_LLVM=0x0900 \
@


1.5
log
@Update build logic for mesa 19.1.7.

A lot of files are now living outside of dist, since they're not in the
distributed sources: they're generated, usually by python/meson.

The remaining changes are due to files being moved around.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2019/03/10 10:51:58 mrg Exp $
d76 1
a76 1
	-DHAVE_LLVM=0x0700 \
@


1.4
log
@pull across most of the new build infrastruture for mesa18 from maya's
git tree.  this includes may of the changes from the changes below:


commit 52d85e74a1197aace38cc7acb705509e969120e6
Author: coypu <coypu@@sdf.org>
Date:   Mon Mar 4 12:25:33 2019 +0200

    Make 32bit archs happier.

    except i386, which now suffers from locked atomics because we
    don't have clever ifunc tricks in libc.

commit ee9b4c19c58127934ed3548ad0d68934cc95ccc7
Author: coypu <coypu@@sdf.org>
Date:   Mon Mar 4 09:08:35 2019 +0200

    Adjust includes, append rather than replace, appease clang ppc builds

commit a5341a3ad42572c78b6a2e6e5545bd323d7f2e4c
Author: coypu <coypu@@sdf.org>
Date:   Sun Mar 3 11:52:19 2019 +0200

    Resolve i386 atomic issue and set lists.

    XXX libGL in i386 is still causing issues
    XXX pkgconfig file for vdpau
    XXX set lists for arm32

commit 27bffc20bc15186c92cc5b8d5cc08d7299966b34
Author: coypu <coypu@@sdf.org>
Date:   Sat Mar 2 21:52:45 2019 +0200

    make llvm sources x86 specific

    hopefully not breaking non-x86 clang builds, which
    have MKLLVM set.

commit f9d34922619cc8f2a224c0138a73985e50daf87f
Author: coypu <coypu@@sdf.org>
Date:   Sat Mar 2 21:33:31 2019 +0200

    move hack to build llvm libraries soon enough.

    add u_process.c to libGL specifically (dri, gallium and libGL all need
    it).

    Add some missing includes for pipe-loader when it moved to gallium

commit 2b1083d0d538bb5d5dd88ab2ca0ca6c331e5dd5b
Author: coypu <coypu@@sdf.org>
Date:   Sat Mar 2 16:47:58 2019 +0200

    shuffle around:

    some files move from shared driver.mk/loader.mk into gallium.
    others move to shared.

    add i915 files.

    now i965 glxgears works (amd64).

commit 1897a90569b30b294bcbedadb3745092eca0bb33
Author: Maya Rashish <maya@@NetBSD.org>
Date:   Sun Feb 24 23:36:26 2019 +0200

    Progress towards glxgears on i915

commit 28c9c99a236404de41ae74e88ea6d9578c088b92
Author: Maya Rashish <maya@@NetBSD.org>
Date:   Sun Feb 24 21:55:56 2019 +0200

    rototill i965/i915 causing it to no longer startx.

    Now missing sw_screen_create in the dri driver.

commit 48eb746983a5a7967fba221e7b167808af36f44a
Author: Maya Rashish <maya@@NetBSD.org>
Date:   Sun Feb 24 09:31:22 2019 +0200

    More of vdpau. Cogs spin.

commit d9fbba8f61a43648d32f160c5fa62626788566ff
Author: Maya Rashish <maya@@NetBSD.org>
Date:   Sat Feb 23 22:36:37 2019 +0200

    Adjust for MesaLib 18.

    Build llvmpipe driver on x86 (the driver itself is x86-only).
    build llvm on all x86, even on GCC builds.
    galahad driver removed (upstream).
    Don't build mesa 7 at all.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2019/03/10 02:29:53 mrg Exp $
d24 1
a24 1
CPPFLAGS.${_f}=	-DMAPI_MODE_GLAPI -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
@


1.3
log
@move mesa10 build into .old scheme:

- add ${X11SRCDIR.MesaLib.old} and introduce ${X11SRCDIR.Mesa} as an
  alias for either the former or the non old.  this allows many of
  the makefiles to simply use ${X11SRCDIR.Mesa} (but does not really
  enable much sharing of makefiles, but reduces their diffs.)

- use mesa-which.mk to define ${OLD_PREFIX} to either "" or ".old",
  and to know if to build 'dri7' (.old only.)  ${OLD_PREFIX} is used
  by other code (eg, LIBDPLIBS) to pick the right subdir.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2017/10/06 20:24:46 christos Exp $
a10 9
# util
.PATH:		${X11SRCDIR.Mesa}/src/util
SRCS.util=	\
	hash_table.c    \
        ralloc.c
.PATH:		${X11SRCDIR.Mesa}/../src/util
SRCS.util+=	\
	format_srgb.c

a13 1
	entry.c \
d15 1
a19 1
CPPFLAGS.entry.c=	-DMAPI_MODE_GLAPI -DMAPI_ABI_HEADER=\"shared-glapi_glapi_mapi_tmp.h\"
d21 5
a25 1
BUILDSYMLINKS+=   ${X11SRCDIR.Mesa}/src/mapi/entry.c shared_entry.c
d29 1
a29 1
SRCS+=	${SRCS.util} ${SRCS.mapi} ${SRCS.mapi-glapi}
d34 1
a34 3
	-I${X11SRCDIR.Mesa}/src/mapi/glapi \
	-I${X11SRCDIR.Mesa}/src/mesa \
	-I${X11SRCDIR.Mesa}/src/util \
d36 1
a36 5
	-I${X11SRCDIR.Mesa}/../src/mapi/glapi \
	-I${X11SRCDIR.Mesa}/../src/mesa

CPPFLAGS+= \
	-DMAPI_MODE_GLAPI -DMAPI_ABI_HEADER=\"shared-glapi_glapi_mapi_tmp.h\"
d53 26
d93 23
d118 2
a119 12
	-DHAVE_PTHREAD=1 \
	-I. \
	-DUSE_EXTERNAL_DXTN_LIB=1 \
	-DHAVE_DLOPEN \
	-DHAVE_POSIX_MEMALIGN \
	-DHAVE_LIBDRM \
	-DGLX_USE_DRM \
	-DGLX_INDIRECT_RENDERING \
	-DGLX_DIRECT_RENDERING \
	-DHAVE_PTHREAD \
	-DHAVE_ALIAS \
	-DMESA_EGL_NO_X11_HEADERS
@


1.2
log
@bump c++ libraries because of the libstdc++ dual abi bump
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2014/12/18 06:24:30 mrg Exp $
d12 1
a12 1
.PATH:		${X11SRCDIR.MesaLib}/src/util
d16 1
a16 1
.PATH:		${X11SRCDIR.MesaLib}/../src/util
d21 1
a21 1
.PATH:		${X11SRCDIR.MesaLib}/src/mapi
d31 1
a31 1
BUILDSYMLINKS+=   ${X11SRCDIR.MesaLib}/src/mapi/entry.c shared_entry.c
d38 8
a45 8
	-I${X11SRCDIR.MesaLib}/include \
	-I${X11SRCDIR.MesaLib}/src/mapi \
	-I${X11SRCDIR.MesaLib}/src/mapi/glapi \
	-I${X11SRCDIR.MesaLib}/src/mesa \
	-I${X11SRCDIR.MesaLib}/src/util \
	-I${X11SRCDIR.MesaLib}/../src/mapi \
	-I${X11SRCDIR.MesaLib}/../src/mapi/glapi \
	-I${X11SRCDIR.MesaLib}/../src/mesa
@


1.2.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2019/03/10 10:51:58 mrg Exp $
d11 9
d21 1
a21 1
.PATH:		${X11SRCDIR.Mesa}/src/mapi
d23 1
a24 1
	shared_entry.c \
d29 1
d31 1
a31 1
BUILDSYMLINKS+=	${X11SRCDIR.Mesa}/src/mapi/entry.c shared_entry.c
d33 1
a33 3
.for _f in ${SRCS.mapi}
CPPFLAGS.${_f}=	-DMAPI_MODE_GLAPI -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
.endfor
d35 1
a35 1
# above is shared/libglapi.la
d37 9
a45 1
SRCS+=	${SRCS.mapi} ${SRCS.mapi-glapi}
d48 1
a48 5
	-I${X11SRCDIR.Mesa}/include \
	-I${X11SRCDIR.Mesa}/src/mapi \
	-I${X11SRCDIR.Mesa}/src \
	-I${X11SRCDIR.Mesa}/../src/mapi \
	-I${X11SRCDIR.Mesa}/../src/mapi/glapi
a64 26
	-D__STDC_CONSTANT_MACROS \
	-D__STDC_FORMAT_MACROS \
	-D__STDC_LIMIT_MACROS \
	-DUSE_GCC_ATOMIC_BUILTINS \
	-DNDEBUG \
	-DHAVE_SYS_SYSCTL_H \
	-DHAVE_DLFCN_H \
	-DHAVE_STRTOF \
	-DHAVE_MKOSTEMP \
	-DHAVE_TIMESPEC_GET \
	-DHAVE_STRTOD_L \
	-DHAVE_DL_ITERATE_PHDR \
	-DHAVE_POSIX_MEMALIGN \
	-DHAVE_ZLIB \
	-DHAVE_LIBDRM \
	-DGLX_USE_DRM \
	-DGLX_INDIRECT_RENDERING \
	-DGLX_DIRECT_RENDERING \
	-DGLX_USE_TLS \
	-DHAVE_X11_PLATFORM \
	-DHAVE_DRM_PLATFORM \
	-DENABLE_SHADER_CACHE \
	-DHAVE_MINCORE \
	-DHAVE_LLVM=0x0700 \
	-DMESA_LLVM_VERSION_PATCH=0 \
	-I. \
a78 23
	-DHAVE___BUILTIN_CLZ=1 \
	-DHAVE___BUILTIN_CLZLL=1 \
	-DHAVE___BUILTIN_CTZ=1 \
	-DHAVE___BUILTIN_EXPECT=1 \
	-DHAVE___BUILTIN_FFS=1 \
	-DHAVE___BUILTIN_FFSLL=1 \
	-DHAVE___BUILTIN_POPCOUNT=1 \
	-DHAVE___BUILTIN_POPCOUNTLL=1 \
	-DHAVE___BUILTIN_UNREACHABLE=1 \
	-DHAVE_FUNC_ATTRIBUTE_CONST=1 \
	-DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 \
	-DHAVE_FUNC_ATTRIBUTE_FORMAT=1 \
	-DHAVE_FUNC_ATTRIBUTE_MALLOC=1 \
	-DHAVE_FUNC_ATTRIBUTE_PACKED=1 \
	-DHAVE_FUNC_ATTRIBUTE_PURE=1 \
	-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=1 \
	-DHAVE_FUNC_ATTRIBUTE_UNUSED=1 \
	-DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1 \
	-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 \
	-DHAVE_FUNC_ATTRIBUTE_WEAK=1 \
	-DHAVE_FUNC_ATTRIBUTE_ALIAS=1 \
	-DHAVE_FUNC_ATTRIBUTE_NORETURN=1 \
	-DHAVE_ENDIAN_H=1 \
d81 12
a92 2
	-DHAVE_PTHREAD_PRIO_INHERIT=1 \
	-DHAVE_PTHREAD=1
@


1.2.4.2
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
d76 1
@


1.2.4.3
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d24 1
a24 1
CPPFLAGS.${_f}=	-DMAPI_MODE_GLAPI -DMAPI_ABI_HEADER=\"shared-glapi_glapi_mapi_tmp.h\"
@


1.1
log
@update sets and reachover makefiles for mesa 10.3.5.
@
text
@d1 1
a1 1
#	$NetBSD$
d8 1
a8 1
SHLIB_MAJOR=    0
@


1.1.10.1
log
@Pull up following revision(s) (requested by christos in ticket #318):
	distrib/sets/lists/base/md.amd64: revision 1.271 via patch
	distrib/sets/lists/base/shl.mi: revision 1.820, 1.821
	distrib/sets/lists/comp/shl.mi: revision 1.307
	distrib/sets/lists/debug/ad.arm: revision 1.75
	distrib/sets/lists/debug/md.amd64: revision 1.99
	distrib/sets/lists/debug/shl.mi: revision 1.182, 1.183
	distrib/sets/lists/xbase/shl.mi: revision 1.78
	distrib/sets/lists/xdebug/shl.mi: revision 1.41
	external/bsd/atf/lib/libatf-c++/shlib_version: revision 1.3
	external/bsd/libproc/lib/Makefile: revision 1.4
	external/gpl3/gcc/lib/libasan/shlib_version: revision 1.3
	external/gpl3/gcc/lib/libstdc++-v3/Makefile: patch
	external/gpl3/gcc/lib/libubsan/shlib_version: revision 1.2
	external/mit/xorg/lib/libGL/shlib_version: revision 1.3
	external/mit/xorg/lib/libGLU/shlib_version: revision 1.4
	external/mit/xorg/lib/libglapi/Makefile: revision 1.2
bump libstdc++ to account for disabling the "dual abi".
bump because of libstdc++
bump because of libstdc++
bump because libstdc++
bump libraries that depend on libstdc++.
bump c++ libraries because of the libstdc++ dual abi bump
bump libglapi, libGL libGLU because of the libstdc++ dual abi bump
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.1 2014/12/18 06:24:30 mrg Exp $
d8 1
a8 1
SHLIB_MAJOR=    1
@


1.1.2.1
log
@file Makefile was added on branch netbsd-7 on 2015-01-05 21:23:50 +0000
@
text
@d1 101
@


1.1.2.2
log
@Pull up following revision(s) (requested by mrg in ticket #381):
	distrib/sets/lists/xdebug/md.amd64: revision 1.7
	external/mit/xorg/lib/libGL/internal/Makefile: revision 1.2
	distrib/sets/lists/xdebug/md.amd64: revision 1.8
	distrib/sets/lists/xserver/md.sparc64: revision 1.55
	distrib/sets/lists/xdebug/md.sparc64: revision 1.4
	external/mit/xorg/lib/Makefile: revision 1.30
	external/mit/xorg/lib/libglapi/Makefile: revision 1.1
	distrib/sets/lists/xserver/md.macppc: revision 1.67
	external/mit/xorg/lib/dri/radeon/Makefile: file removal
	external/mit/xorg/lib/asm.mk: revision 1.1
	external/mit/xorg/lib/dri/dri.mk: file removal
	external/mit/xorg/lib/dri/mach64/Makefile: file removal
	external/mit/xorg/lib/libGL/Makefile: revision 1.21
	external/mit/xorg/lib/libGL/Makefile.glslsrcs: file removal
	external/mit/xorg/lib/dri/Makefile: revision 1.20
	external/mit/xorg/lib/driver.mk: revision 1.1
	external/mit/xorg/lib/dri/r600/Makefile: file removal
	external/mit/xorg/lib/dri/r128/Makefile: file removal
	external/mit/xorg/lib/dri/i915/Makefile: file removal
	external/mit/xorg/lib/dri/Makefile: revision 1.23
	external/mit/xorg/lib/gallium/Makefile: revision 1.1
	external/mit/xorg/lib/gallium/Makefile: revision 1.2
	distrib/sets/lists/xcomp/mi: revision 1.154
	external/mit/xorg/lib/libOSMesa/libmesa.mk: file removal
	external/mit/xorg/lib/libGL/mesa-ver.mk: revision 1.2
	distrib/sets/lists/xserver/mi: revision 1.34
	external/mit/xorg/bin/glxgears/Makefile: revision 1.4
	distrib/sets/lists/xserver/md.alpha: revision 1.38
	external/mit/xorg/lib/libOSMesa/shlib_version: file removal
	external/mit/xorg/lib/dri/trident/Makefile: file removal
	external/mit/xorg/lib/dri/i810/Makefile: file removal
	external/mit/xorg/lib/libGLw/Makefile: revision 1.4
	external/mit/xorg/TODO: file removal
	external/mit/xorg/lib/dri/sis/Makefile: file removal
	distrib/sets/lists/xserver/md.sparc: revision 1.57
	distrib/sets/lists/xserver/md.prep: revision 1.15
	distrib/sets/lists/xcomp/shl.mi: revision 1.38
	external/mit/xorg/lib/dri/tdfx/Makefile: file removal
	external/mit/xorg/lib/dri/mga/Makefile: file removal
	distrib/sets/lists/xdebug/md.macppc: revision 1.4
	external/mit/xorg/lib/libOSMesa/Makefile: file removal
	distrib/sets/lists/xdebug/shl.mi: revision 1.16
	external/mit/xorg/lib/libGL/Makefile.mesa: file removal
	distrib/sets/lists/xdebug/mi: revision 1.9
	distrib/sets/lists/xdebug/md.i386: revision 1.7
	external/mit/xorg/lib/dri/swrast/Makefile: file removal
	distrib/sets/lists/xdebug/md.i386: revision 1.8
	external/mit/xorg/lib/dri/savage/Makefile: file removal
	external/mit/xorg/lib/dri/r200/Makefile: file removal
	distrib/sets/lists/xetc/mi: revision 1.24
	distrib/sets/lists/xbase/shl.mi: revision 1.57
	distrib/sets/lists/xdebug/md.sparc: revision 1.5
	external/mit/xorg/lib/dri/i965/Makefile: file removal
	external/mit/xorg/lib/libloader.mk: revision 1.1
	external/mit/xorg/bin/glxinfo/Makefile: revision 1.5
	distrib/sets/lists/xserver/md.ofppc: revision 1.20
	external/mit/xorg/lib/libmesa.mk: revision 1.1
	external/mit/xorg/lib/dri/libmesa/Makefile: file removal
	external/mit/xorg/lib/dri/Makefile: revision 1.19
	distrib/sets/lists/xserver/md.amd64: revision 1.74
	distrib/sets/lists/xserver/md.bebox: revision 1.11
	distrib/sets/lists/xdebug/md.ofppc: revision 1.4
	external/mit/xorg/lib/libglsl.mk: revision 1.1
	external/mit/xorg/lib/dri/r300/Makefile: file removal
	external/mit/xorg/lib/dri/unichrome/Makefile: file removal
	external/mit/xorg/lib/dri/s3v/Makefile: file removal
	distrib/sets/lists/xserver/md.i386: revision 1.93
update sets and reachover makefiles for mesa 10.3.5.
fix build problem with radeon_*.c files.
- mesa_dri_drivers.so.0.debug is not obsolete for amd64
- kms_swrast_dri.so.0.debug was missing
- Don't install absolute symlinks
- Add missing debug symlinks
- consistently install symlinks (like we do for everything else)
- add missing debug libs
@
text
@a0 101
#	$NetBSD: Makefile,v 1.1 2014/12/18 06:24:30 mrg Exp $

.include <bsd.own.mk>

LIB=		glapi
LIBISCXX=	yes

SHLIB_MAJOR=    0
SHLIB_MINOR=    0

# util
.PATH:		${X11SRCDIR.MesaLib}/src/util
SRCS.util=	\
	hash_table.c    \
        ralloc.c
.PATH:		${X11SRCDIR.MesaLib}/../src/util
SRCS.util+=	\
	format_srgb.c

# mapi
.PATH:		${X11SRCDIR.MesaLib}/src/mapi
SRCS.mapi=	\
	entry.c \
	mapi_glapi.c \
	stub.c \
	table.c \
	u_current.c \
	u_execmem.c
CPPFLAGS.entry.c=	-DMAPI_MODE_GLAPI -DMAPI_ABI_HEADER=\"shared-glapi_glapi_mapi_tmp.h\"

BUILDSYMLINKS+=   ${X11SRCDIR.MesaLib}/src/mapi/entry.c shared_entry.c

# above is shared/libglapi.la

SRCS+=	${SRCS.util} ${SRCS.mapi} ${SRCS.mapi-glapi}

CPPFLAGS+= \
	-I${X11SRCDIR.MesaLib}/include \
	-I${X11SRCDIR.MesaLib}/src/mapi \
	-I${X11SRCDIR.MesaLib}/src/mapi/glapi \
	-I${X11SRCDIR.MesaLib}/src/mesa \
	-I${X11SRCDIR.MesaLib}/src/util \
	-I${X11SRCDIR.MesaLib}/../src/mapi \
	-I${X11SRCDIR.MesaLib}/../src/mapi/glapi \
	-I${X11SRCDIR.MesaLib}/../src/mesa

CPPFLAGS+= \
	-DMAPI_MODE_GLAPI -DMAPI_ABI_HEADER=\"shared-glapi_glapi_mapi_tmp.h\"

CPPFLAGS+=	${X11FLAGS.THREADLIB}

.include "${.CURDIR}/../libGL/mesa-ver.mk"

CFLAGS+=	-fno-strict-aliasing -fvisibility=hidden -pthread -fno-builtin-memcmp

CPPFLAGS+=	\
	-DPACKAGE_NAME=\"Mesa\" \
	-DPACKAGE_TARNAME=\"mesa\" \
	-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
	-DPACKAGE_VERSION=\"${MESA_VER}\" \
	-DPACKAGE_STRING=\"Mesa\ ${MESA_VER}\" \
	-DVERSION=\"${MESA_VER}\" \
	-DPACKAGE_URL=\"\" \
	-DPACKAGE=\"mesa\" \
	-DSTDC_HEADERS=1 \
	-DHAVE_SYS_TYPES_H=1 \
	-DHAVE_SYS_STAT_H=1 \
	-DHAVE_STDLIB_H=1 \
	-DHAVE_STRING_H=1 \
	-DHAVE_MEMORY_H=1 \
	-DHAVE_STRINGS_H=1 \
	-DHAVE_INTTYPES_H=1 \
	-DHAVE_STDINT_H=1 \
	-DHAVE_UNISTD_H=1 \
	-DHAVE_DLFCN_H=1 \
	-DYYTEXT_POINTER=1 \
	-DHAVE___BUILTIN_BSWAP32=1 \
	-DHAVE___BUILTIN_BSWAP64=1 \
	-DHAVE_DLADDR=1 \
	-DHAVE_CLOCK_GETTIME=1 \
	-DHAVE_PTHREAD=1 \
	-I. \
	-DUSE_EXTERNAL_DXTN_LIB=1 \
	-DHAVE_DLOPEN \
	-DHAVE_POSIX_MEMALIGN \
	-DHAVE_LIBDRM \
	-DGLX_USE_DRM \
	-DGLX_INDIRECT_RENDERING \
	-DGLX_DIRECT_RENDERING \
	-DHAVE_PTHREAD \
	-DHAVE_ALIAS \
	-DMESA_EGL_NO_X11_HEADERS

.include "../asm.mk"

MKLINT=no

#CWARNFLAGS.clang+=	-Wno-tautological-compare -Wno-format -Wno-constant-conversion

.include <bsd.x11.mk>
.include <bsd.lib.mk>
@


