define SDK path in conv-mach.sh
authorDavid Kunzman <kunzman2@illinois.edu>
Fri, 17 Mar 2006 23:54:43 +0000 (23:54 +0000)
committerDavid Kunzman <kunzman2@illinois.edu>
Fri, 17 Mar 2006 23:54:43 +0000 (23:54 +0000)
error checking in special.sh, generates Makefile.cell which can be used for any Makefile.

src/arch/net-linux-cell/conv-mach.sh
src/arch/net-linux-cell/special.sh

index de2be21d929efbe2a874780bb04f10aef9f120af..aa606453fe6b0218e532b05e23da4726d758cdc4 100644 (file)
@@ -1,11 +1,12 @@
 CELL_SDK_DIR="$HOME/cellsim"
+
 CMK_CPP_CHARM='/usr/lib/cpp'
 CMK_CPP_C='ppu32-gcc -E'
 CMK_CXXPP='ppu32-g++ -E'
 CMK_CC="ppu32-gcc -fPIC -w -I$CELL_SDK_DIR/sysroot/usr/include"
 CMK_CXX="ppu32-g++ -fPIC -w  -I$CELL_SDK_DIR/sysroot/usr/include"
-CMK_LD="$CMK_CC -L$HOME/cellsim/systemsim-cell-release/run/cell/linux/spert -L$CELL_SDK_DIR/sysroot/usr/lib "
-CMK_LDXX="$CMK_CXX -L$HOME/cellsim/systemsim-cell-release/run/cell/linux/spert -L$CELL_SDK_DIR/sysroot/usr/lib "
+CMK_LD="$CMK_CC -L$CELL_SDK_DIR/sysroot/usr/lib "
+CMK_LDXX="$CMK_CXX -L$CELL_SDK_DIR/sysroot/usr/lib "
 
 CMK_SEQ_CC=$CMK_CC
 CMK_SEQ_CXX=$CMK_CXX
index 24c6d5de255fb1c6b0f49b12a170a2b9c7f7ac54..58ebd8f46e8f1c300da7d5e51b9ea2f7335ec4b0 100755 (executable)
@@ -10,4 +10,19 @@ do
 done
 
 #make library
+. ./conv-mach.sh
+if test ! -f $CELL_SDK_DIR/sysroot/usr/include/libspe.h
+then
+  echo "Please define CELL_SDK_DIR in charm/src/arch/net-linux-cell/conv-mach.sh!"
+  exit 1
+fi
+
+cat > Makefile.cell << EOF
+CELL_SDK_DIR=$CELL_SDK_DIR
+SPU_CC = spu-gcc \$(OPTS)
+SPU_CXX = spu-g++ \$(OPTS)
+SPU_AR = spu-ar
+PPU_EMBEDSPU = ppu32-embedspu
+EOF
+
 cd cell_lib && make install