[Mesa-dev] [PATCH 2/4] makefile: Add Haiku makefile build support

Alexander von Gluck kallisti5 at unixzen.com
Fri Dec 23 15:24:30 PST 2011


---
  Makefile      |    1 +
  acinclude.m4  |    2 +-
  configs/haiku |   66 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 68 insertions(+), 1 deletions(-)
  create mode 100644 configs/haiku

diff --git a/Makefile b/Makefile
index cf6555c..4caa8ce 100644
--- a/Makefile
+++ b/Makefile
@@ -90,6 +90,7 @@ freebsd \
  freebsd-dri \
  freebsd-dri-amd64 \
  freebsd-dri-x86 \
+haiku \
  hpux10 \
  hpux10-gcc \
  hpux10-static \
diff --git a/acinclude.m4 b/acinclude.m4
index a5b389d..1ff61c2 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -34,7 +34,7 @@ if test "$enable_pic" != no; then
          # see if we're using GCC
          if test "x$GCC" = xyes; then
              case "$host_os" in
-            aix*|beos*|cygwin*|irix5*|irix6*|osf3*|osf4*|osf5*)
+            aix*|haiku*|cygwin*|irix5*|irix6*|osf3*|osf4*|osf5*)
                  # PIC is the default for these OSes.
                  ;;
              mingw*|os2*|pw32*)
diff --git a/configs/haiku b/configs/haiku
new file mode 100644
index 0000000..12f958e
--- /dev/null
+++ b/configs/haiku
@@ -0,0 +1,66 @@
+# Configuration for Haiku
+# Written by Alexander von Gluck IV
+#
+# Based on the BeOS config
+# written by Philippe Houdoin
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = haiku
+
+# Haiku settings
+
+DEFINES = \
+	-DBEOS_THREADS \
+	-DGNU_ASSEMBLER \
+	-DUSE_X86_ASM \
+	-DUSE_MMX_ASM \
+	-DUSE_3DNOW_ASM \
+	-DUSE_SSE_ASM
+
+MESA_ASM_SOURCES = $(X86_SOURCES)
+GLAPI_ASM_SOURCES = $(X86_API)
+
+CC = gcc
+CXX = g++
+LD = gcc
+
+CFLAGS = -Wall -Wno-multichar $(DEFINES)
+CXXFLAGS = $(CFLAGS)
+LDFLAGS += -Xlinker
+
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing -std=c99
+CXXFLAGS += -fno-strict-aliasing
+
+# No makedepend on Haiku, this will solve it
+MKDEP = true
+
+# Debug defines
+ifdef DEBUG
+	CFLAGS  += -g -O0
+	LDFLAGS += -g
+	DEFINES += -DDEBUG
+else
+	CFLAGS   += -O3
+endif
+
+# Glut setings
+GLUT_CFLAGS = -fexceptions
+
+# Gallium settings
+GALLIUM_DRIVERS_DIRS = trace softpipe i915 r300
+GALLIUM_STATE_TRACKERS_DIRS =
+
+# Directories
+SRC_DIRS = gallium glsl mapi/glapi mesa/x86 mesa glu
+SRC_DIRS += glut/beos
+GLU_DIRS = sgi
+DRIVER_DIRS =
+
+# Library/program dependencies
+GL_LIB_DEPS =
+OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
+GLU_LIB_DEPS =
+GLUT_LIB_DEPS = -lgame -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
+APP_LIB_DEPS = -lbe -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)
-- 
1.7.2.5


More information about the mesa-dev mailing list