summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-08 02:19:52 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-08 02:19:52 -0700
commit01ac4540f04d47b64aeead8984c92e39b436b5f9 (patch)
tree1f44c4a14635cfeabb447595236efb44109386f7
parentee8dfdf4c9f0bbf4f99a6b78dbddc4871fd80a1c (diff)
Apple: Some changes to fix compilation problems on OSX
-rw-r--r--configs/darwin8
-rw-r--r--include/GL/internal/dri_interface.h7
2 files changed, 12 insertions, 3 deletions
diff --git a/configs/darwin b/configs/darwin
index c7f94d2bad..b8a32cbd01 100644
--- a/configs/darwin
+++ b/configs/darwin
@@ -11,8 +11,8 @@ DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
# Compiler and flags
CC = gcc
CXX = gcc
-CFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
-CXXFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
+CFLAGS = -I/usr/X11/include -O2 -no-cpp-precomp -dynamic $(DEFINES)
+CXXFLAGS = -I/usr/X11/include -O2 -no-cpp-precomp -dynamic $(DEFINES)
CFLAGS += $(RC_CFLAGS)
CXXFLAGS += $(RC_CFLAGS)
@@ -35,6 +35,8 @@ GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11/lib -lX11 -lXmu -lXt -lXi -lm
+INSTALL_DIR = /usr/X11
+
# omit glw lib for now:
-SRC_DIRS = glx/x11 glu glut/glx mesa
+SRC_DIRS = glx/x11 mesa glu glut/glx
DRIVER_DIRS = osmesa
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 033d7a4ae4..e7780d2e26 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -40,7 +40,14 @@
#ifndef DRI_INTERFACE_H
#define DRI_INTERFACE_H
+/* Make this something other than __APPLE__ for other arcs with no drm.h */
+#ifndef __APPLE__
#include <drm.h>
+#else
+typedef unsigned int drm_context_t;
+typedef unsigned int drm_drawable_t;
+typedef struct drm_clip_rect drm_clip_rect_t;
+#endif
/**
* \name DRI interface structures