Squashed commit of the following:
[mesa.git] / configs / linux-cell
index f2c1dd25e53b189ee1e4c856a4b7b4d541dde2be..e87e69a8065aaa28ec57a5d2769069b815e9a412 100644 (file)
@@ -1,44 +1,72 @@
-# linux-cell
+# linux-cell  (non-debug build)
 
-include $(TOP)/configs/default
+include $(TOP)/configs/linux
 
 CONFIG_NAME = linux-cell
 
 
+# Omiting other gallium drivers:
+GALLIUM_DRIVERS_DIRS = cell softpipe trace rbug identity
+
+
 # Compiler and flags
-CC = /usr/bin/ppu32-gcc
-CXX = /usr/bin/ppu32-g++
+CC = ppu32-gcc
+CXX = ppu32-g++
+HOST_CC = gcc
+APP_CC = gcc
+APP_CXX = g++
+
+OPT_FLAGS = -O3
 
 # Cell SDK location
-SDK = /opt/ibm/cell-sdk/prototype/sysroot/usr
+## For SDK 2.1: (plus, remove -DSPU_MAIN_PARAM_LONG_LONG below)
+#SDK = /opt/ibm/cell-sdk/prototype/sysroot/usr
+## For SDK 3.0:
+SDK = /opt/cell/sdk/usr
+
 
 
-CFLAGS = -g -W -Winline -fPIC -m32 -mabi=altivec -maltivec -I. -I/usr/include -I$(SDK)/include -include altivec.h -DGALLIUM_CELL
+COMMON_C_CPP_FLAGS = $(OPT_FLAGS) -Wall -Winline \
+       -fPIC -m32 -mabi=altivec -maltivec \
+       -I. -I$(SDK)/include \
+       -DGALLIUM_CELL $(DEFINES)
+
+CFLAGS = $(COMMON_C_CPP_FLAGS) -Wmissing-prototypes -std=c99
+
+CXXFLAGS = $(COMMON_C_CPP_FLAGS)
 
-CXXFLAGS = $(CFLAGS)
 
 # Omitting glw here:
-SRC_DIRS = mesa glu glut/glx
+SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
+       gallium gallium/winsys gallium/targets glu
+
+# Build no traditional Mesa drivers:
+DRIVER_DIRS =
 
 
 MKDEP_OPTIONS = -fdepend -Y
 
 
 GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread \
-       -L$(SDK)/lib -m32 -Wl,-m,elf32ppc -R$(SDK)/lib -lspe
+       -L$(SDK)/lib -m32 -Wl,-m,elf32ppc -R$(SDK)/lib -lspe2
+
 
+CELL_SPU_LIB = $(TOP)/src/gallium/drivers/cell/spu/g3d_spu.a
 
 
 ### SPU stuff
 
-SPU_CC = /usr/bin/spu-gcc
+SPU_CC = spu-gcc
 
-SPU_CFLAGS = -g -W -Wall -Winline -Wno-main -I. -I $(SDK)/spu/include -include spu_intrinsics.h -I $(TOP)/src/mesa/
+SPU_CFLAGS = $(OPT_FLAGS) -W -Wall -Winline -Wmissing-prototypes -Wno-main \
+       -I. -I$(SDK)/spu/include -I$(TOP)/src/mesa/ $(INCLUDE_DIRS) \
+       -DSPU_MAIN_PARAM_LONG_LONG \
+       -include spu_intrinsics.h
 
-SPU_LFLAGS = -L$(SDK)/spu/lib -Wl,-N -lmisc
+SPU_LFLAGS = -L$(SDK)/spu/lib -Wl,-N -lmisc -lm
 
-SPU_AR = /usr/bin/ar
+SPU_AR = ppu-ar
 SPU_AR_FLAGS = -qcs
 
-SPU_EMBED = /usr/bin/embedspu
+SPU_EMBED = ppu32-embedspu
 SPU_EMBED_FLAGS = -m32