a2c364b096
--HG-- extra : convert_revision : e16d8a77a96c0a5789f184919665e7fe123f7993
142 lines
4.4 KiB
Diff
142 lines
4.4 KiB
Diff
--- bin/mklib.orig 2008-10-03 21:24:53.000000000 +0000
|
|
+++ bin/mklib 2008-10-03 21:25:41.000000000 +0000
|
|
@@ -398,7 +398,7 @@ case $ARCH in
|
|
fi
|
|
;;
|
|
|
|
- 'FreeBSD')
|
|
+ 'FreeBSD' | 'NetBSD')
|
|
# we assume gcc
|
|
|
|
if [ "x$LINK" = "x" ] ; then
|
|
@@ -441,23 +441,6 @@ case $ARCH in
|
|
fi
|
|
;;
|
|
|
|
- 'NetBSD')
|
|
- if [ $STATIC = 1 ] ; then
|
|
- LIBNAME="lib${LIBNAME}_pic.a"
|
|
- echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
|
|
- rm -f ${LIBNAME}
|
|
- ar cq ${LIBNAME} ${OBJECTS}
|
|
- ranlib ${LIBNAME}
|
|
- FINAL_LIBS=${LIBNAME}
|
|
- else
|
|
- LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
|
|
- echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
|
|
- rm -f ${LIBNAME}
|
|
- ld -x -Bshareable -Bforcearchive -o ${LIBNAME} ${OBJECTS}
|
|
- FINAL_LIBS=${LIBNAME}
|
|
- fi
|
|
- ;;
|
|
-
|
|
'IRIX' | 'IRIX64')
|
|
if [ $STATIC = 1 ] ; then
|
|
LIBNAME="lib${LIBNAME}.a"
|
|
--- configure.orig 2008-09-13 20:45:59.000000000 +0000
|
|
+++ configure 2008-10-03 21:28:31.000000000 +0000
|
|
@@ -4674,14 +4674,14 @@ if test "x$enable_asm" = xyes; then
|
|
case "$host_cpu" in
|
|
i?86)
|
|
case "$host_os" in
|
|
- linux* | freebsd* | dragonfly*)
|
|
+ linux* | netbsd* | freebsd* | dragonfly*)
|
|
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
|
|
;;
|
|
esac
|
|
;;
|
|
x86_64)
|
|
case "$host_os" in
|
|
- linux* | freebsd* | dragonfly*)
|
|
+ linux* | blah* | freebsd* | dragonfly*)
|
|
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
|
|
;;
|
|
esac
|
|
@@ -5722,7 +5722,7 @@ linux*)
|
|
i*86|x86_64|powerpc*) default_driver="dri";;
|
|
esac
|
|
;;
|
|
-freebsd* | dragonfly*)
|
|
+freebsd* | netbsd* | dragonfly*)
|
|
case "$host_cpu" in
|
|
i*86|x86_64) default_driver="dri";;
|
|
esac
|
|
@@ -7863,7 +7863,7 @@ if test "$mesa_driver" = dri; then
|
|
;;
|
|
esac
|
|
;;
|
|
- freebsd* | dragonfly*)
|
|
+ freebsd* | netbsd* | dragonfly*)
|
|
DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
|
|
DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
|
|
DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
|
|
--- configs/netbsd.orig 2008-08-25 14:46:41.000000000 +0000
|
|
+++ configs/netbsd 2008-10-03 21:54:30.000000000 +0000
|
|
@@ -4,14 +4,53 @@ include $(TOP)/configs/default
|
|
|
|
CONFIG_NAME = netbsd
|
|
|
|
-# Compiler and flags
|
|
CC = gcc
|
|
CXX = g++
|
|
-CFLAGS = -O2 -fPIC -DUSE_XSHM -I/usr/X11R6/include -DHZ=100
|
|
-CXXFLAGS = -O2 -fPIC
|
|
+MAKE = gmake
|
|
+
|
|
+OPT_FLAGS = -O2
|
|
+PIC_FLAGS = -fPIC -DPIC -shared
|
|
+
|
|
+#DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \
|
|
+ -DHZ=100 -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
|
+ -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS
|
|
+
|
|
GLUT_CFLAGS = -fexceptions
|
|
-APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
|
|
+
|
|
+EXTRA_LIB_PATH =
|
|
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
|
|
+
|
|
+CFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 -Wundef -ffast-math \
|
|
+ $(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
|
|
+
|
|
+CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES)
|
|
|
|
# Work around aliasing bugs - developers should comment this out
|
|
CFLAGS += -fno-strict-aliasing
|
|
CXXFLAGS += -fno-strict-aliasing
|
|
+
|
|
+ASM_SOURCES =
|
|
+
|
|
+# Library/program dependencies
|
|
+LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
|
|
+LIBDRM_LIB = `pkg-config --libs libdrm`
|
|
+DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
|
|
+GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
|
+ -lm -pthread $(LIBDRM_LIB)
|
|
+
|
|
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
|
|
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lXt -lX11
|
|
+
|
|
+
|
|
+# Directories
|
|
+SRC_DIRS = glx/x11 mesa glu glut/glx glw
|
|
+DRIVER_DIRS = dri
|
|
+PROGRAM_DIRS =
|
|
+WINDOW_SYSTEM=dri
|
|
+
|
|
+DRM_SOURCE_PATH=$(TOP)/../drm
|
|
+
|
|
+# ffb and gamma are missing because they have not been converted to use the new
|
|
+# interface.
|
|
+DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
|
|
+ unichrome savage sis
|
|
--- src/mesa/drivers/dri/Makefile.template.orig 2008-10-03 22:24:45.000000000 +0000
|
|
+++ src/mesa/drivers/dri/Makefile.template 2008-10-03 22:25:05.000000000 +0000
|
|
@@ -50,6 +50,7 @@ SHARED_INCLUDES = \
|
|
-I$(TOP)/src/mesa/glapi \
|
|
-I$(TOP)/src/egl/main \
|
|
-I$(TOP)/src/egl/drivers/dri \
|
|
+ -I$(TOP)/src/mesa/drivers/dri/radeon \
|
|
$(LIBDRM_CFLAGS)
|
|
|
|
|