Merge remote branch 'origin/mesa_7_7_branch'
[mesa.git] / configs / darwin
1 # Configuration for Darwin / MacOS X, making dynamic libs
2
3 include $(TOP)/configs/default
4
5 CONFIG_NAME = darwin
6
7 INSTALL_DIR = /usr/X11
8
9 X11_DIR = $(INSTALL_DIR)
10
11 # Compiler and flags
12 CC = gcc
13 CXX = g++
14 PIC_FLAGS = -fPIC
15 DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
16 -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
17
18 # -D_GNU_SOURCE - for src/mesa/main ...
19 # -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11
20 # -DGLX_USE_APPLEGL - supposed to be used with GLX_DIRECT_RENDERING to use AGL rather than DRM, but doesn't compile
21 # -DIN_DRI_DRIVER
22
23 ARCH_FLAGS += $(RC_CFLAGS)
24
25 CFLAGS = -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
26 -I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
27 CXXFLAGS = -ggdb3 -Os -Wall -fno-strict-aliasing \
28 -I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
29
30 # Library names (actual file names)
31 GL_LIB_NAME = libGL.dylib
32 GLU_LIB_NAME = libGLU.dylib
33 GLUT_LIB_NAME = libglut.dylib
34 GLW_LIB_NAME = libGLw.dylib
35 OSMESA_LIB_NAME = libOSMesa.dylib
36
37 # globs used to install the lib and all symlinks
38 GL_LIB_GLOB = libGL.*dylib
39 GLU_LIB_GLOB = libGLU.*dylib
40 GLUT_LIB_GLOB = libglut.*dylib
41 GLW_LIB_GLOB = libGLw.*dylib
42 OSMESA_LIB_GLOB = libOSMesa.*dylib
43
44 GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
45 OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
46 GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
47 GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
48 GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt
49 APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
50
51 # omit glw lib for now:
52 SRC_DIRS = glsl glx/x11 mesa gallium glu glut/glx glew
53 GLU_DIRS = sgi
54 DRIVER_DIRS = osmesa
55 #DRIVER_DIRS = dri
56 DRI_DIRS = swrast
57 PROGRAM_DIRS = xdemos