aboutsummaryrefslogtreecommitdiff
path: root/configs/netbsd-verite
diff options
context:
space:
mode:
Diffstat (limited to 'configs/netbsd-verite')
-rw-r--r--configs/netbsd-verite58
1 files changed, 58 insertions, 0 deletions
diff --git a/configs/netbsd-verite b/configs/netbsd-verite
new file mode 100644
index 0000000..d4863a0
--- /dev/null
+++ b/configs/netbsd-verite
@@ -0,0 +1,58 @@
+# Configuration for NetBSD, Rendition Verite driver over librlgl,
+# no X, static libGL.
+#
+# Native build: gcc on the NetBSD host (needs GNU make).
+# Cross build from a Linux host with NetBSD src cross tools:
+# VERITE_CROSS=/path/to/tooldir/bin/powerpc--netbsd- \
+# VERITE_SYSROOT=/path/to/netbsd/sysroot \
+# gmake netbsd-verite
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = netbsd-verite
+
+ifdef VERITE_CROSS
+CC = $(VERITE_CROSS)gcc --sysroot=$(VERITE_SYSROOT)
+CXX = $(VERITE_CROSS)g++ --sysroot=$(VERITE_SYSROOT)
+else
+CC = gcc
+CXX = g++
+endif
+
+# librlgl/libv3d/rlgl and the vendored verite3dio.h kernel ABI now live in
+# the driver tree (src/mesa/drivers/verite); the rlvec.h CPU-kernel header
+# lives in src/mesa/ppc. The tree is self-contained -- no dependency on
+# ../tools or the NetBSD ../src checkout.
+# -MMD -MP: emit a per-object .d of header prerequisites at compile time,
+# consumed via "-include" in src/mesa/Makefile. This replaces the missing
+# makedepend (MKDEP=true below) so editing a header rebuilds its dependents
+# instead of silently leaving stale objects.
+CFLAGS = -O2 -mcpu=603e -fsigned-char -fno-strict-aliasing -ffast-math \
+ -DUSE_PPC_ASM -DRLVEC_PPC -MMD -MP \
+ -I$(TOP)/src/mesa/ppc
+CXXFLAGS = $(CFLAGS)
+
+# Driver-layer perf instrumentation (vrperf.h): OFF by default so ship
+# and upstream builds carry byte-identical objects. Build with
+# gmake netbsd-verite VERITE_INSTRUMENT=1
+# to compile it in, then run any app with VRMESA_PROF=1..3 to enable it
+# at runtime (silent otherwise). (Header dependencies are tracked via the
+# compiler's -MMD .d files, so editing a header now rebuilds its dependents
+# automatically.)
+ifdef VERITE_INSTRUMENT
+CFLAGS += -DVERITE_INSTRUMENT
+endif
+
+# no makedepend in the NetBSD base system
+MKDEP = true
+
+MKLIB_OPTIONS = -static
+GL_LIB_NAME = libGL.a
+OSMESA_LIB_NAME = libOSMesa.a
+
+SRC_DIRS = mesa
+DRIVER_DIRS = verite
+PROGRAM_DIRS =
+
+GL_LIB_DEPS =
+APP_LIB_DEPS = -L$(LIB_DIR) -lGL -lm