Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions trunk/build-mac-debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#! /bin/bash -e

cd libraries
./build-boost_1_39_0-mac.sh
./build-gdcm-1.2.5-mac.sh
./build-ITK-3.14.0-mac.sh
./build-wxWidgets-2.8.10-mac.sh
cd ..

echo "[millipede] Building millipede"

if [ ! -d build ]
then
GDCM_DIR=`pwd`/libraries/gdcm-1.2.5/build
ITK_DIR=`pwd`/libraries/ITK-3.14.0/build
WXWIDGETS_DIR=`pwd`/libraries/wxWidgets-2.8.10/build28
WXWIDGETS_CONFIG=$WXWIDGETS_DIR/wx-config
WXWIDGETS_WXRC=$WXWIDGETS_DIR/wxrc

INSTALL_DIR=`pwd`/install

mkdir build
cd build

echo "[millipede] ...Configuring using CMake..."
cmake -DCMAKE_BUILD_TYPE=Debug -DGDCM_DIR=$GDCM_DIR -DITK_DIR=$ITK_DIR -DwxWidgets_CONFIG_EXECUTABLE=$WXWIDGETS_CONFIG -DwxWidgets_wxrc_EXECUTABLE=$WXWIDGETS_WXRC -DCMAKE_OSX_ARCHITECTURES=i386 -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR ../source
cd ..
fi

cd build

echo "[millipede] ...Running build..."
make -j2

echo "[millipede] ...Installing..."
make install

echo "[millipede] ...Finished building millipede."
12 changes: 12 additions & 0 deletions trunk/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/bash -e

/bin/rm -fR build
/bin/rm -fR install

cd libraries
/bin/rm -fR boost_1_39_0
/bin/rm -fR boost-setup
/bin/rm -fR gdcm-1.2.5
/bin/rm -fR ITK-3.14.0
/bin/rm -fR wxWidgets-2.8.10
/bin/rm -fR *.log
40 changes: 40 additions & 0 deletions trunk/libraries/build-ITK-3.14.0-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! /bin/bash -e

LOG=../../build-ITK-3.14.0.log

echo "[millipede] Building ITK 3.14.0"

if [ -d ITK-3.14.0 ]
then
echo "[millipede] ...Skipping archive extraction (already extracted)"
else
echo "[millipede] ...Extracting archive..."
/bin/rm -fR tmp
mkdir tmp
cd tmp
tar xzf ../setup/ITK-3.14.0/InsightToolkit-3.14.0.tar.gz
cd ..
mkdir ITK-3.14.0
mv tmp/InsightToolkit-3.14.0 ITK-3.14.0/source
rmdir tmp
fi

cd ITK-3.14.0

if [ -d build ]
then
echo "[millipede] ...Skipping build (already built)"
else
INSTALL_DIR=`pwd`/install

mkdir build
cd build

echo "[millipede] ...Configuring using CMake..."
cmake -Wno-dev -DBUILD_DOXYGEN=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DITK_USE_KWSTYLE=OFF -DCMAKE_OSX_ARCHITECTURES=i386 -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR ../source > $LOG 2>&1

echo "[millipede] ...Running build..."
make -j2 >> $LOG 2>&1
fi

echo "[millipede] ...Finished building ITK 3.14.0."
40 changes: 40 additions & 0 deletions trunk/libraries/build-boost_1_39_0-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! /bin/bash -e

LOG=../build-boost_1_39_0.log

echo "[millipede] Building Boost 1.39.0"

if [ -d boost_1_39_0 ]
then
echo "[millipede] ...Skipping build (already built)"
exit
fi

if [ -d boost-setup ]
then
echo "[millipede] ...Skipping archive extraction (already extracted)"
else
echo "[millipede] ...Extracting archive..."
/bin/rm -fR tmp
mkdir tmp
cd tmp
tar xzf ../setup/boost_1_39_0/boost_1_39_0.tar.gz
cd ..
mv tmp/boost_1_39_0 boost-setup
rmdir tmp
fi

cd boost-setup

if [ -e bjam ]
then
echo "[millipede] ...Skipping bootstrapping (bjam already exists)"
else
echo "[millipede] ...Bootstrapping..."
./bootstrap.sh > $LOG
fi

echo "[millipede] ...Running build..."
./bjam -j2 --libdir=../boost_1_39_0/lib --includedir=../boost_1_39_0/include --abbreviate-paths --with-date_time --with-filesystem --with-thread --build-type=complete toolset=darwin architecture=x86 install >> $LOG

echo "[millipede] ...Finished building Boost 1.39.0."
40 changes: 40 additions & 0 deletions trunk/libraries/build-gdcm-1.2.5-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! /bin/bash -e

LOG=../../build-gdcm-1.2.5.log

echo "[millipede] Building GDCM 1.2.5"

if [ -d gdcm-1.2.5 ]
then
echo "[millipede] ...Skipping archive extraction (already extracted)"
else
echo "[millipede] ...Extracting archive..."
/bin/rm -fR tmp
mkdir tmp
cd tmp
tar xzf ../setup/gdcm-1.2.5/gdcm-1.2.5.tar.gz
cd ..
mkdir gdcm-1.2.5
mv tmp/gdcm-1.2.5 gdcm-1.2.5/source
rmdir tmp
fi

cd gdcm-1.2.5

if [ -d build ]
then
echo "[millipede] ...Skipping build (already built)"
else
INSTALL_DIR=`pwd`/install

mkdir build
cd build

echo "[millipede] ...Configuring using CMake..."
cmake -DBUILD_TESTING=OFF -DGDCM_BUILD_EXAMPLES=OFF -DGDCM_BUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES=i386 -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR ../source > $LOG

echo "[millipede] ...Running build..."
make -j2 >> $LOG
fi

echo "[millipede] ...Finished building GDCM 1.2.5."
40 changes: 40 additions & 0 deletions trunk/libraries/build-wxWidgets-2.8.10-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#! /bin/bash -e

# Note: This has been tested on Snow Leopard, but probably doesn't yet work on other versions of Mac OS X.

LOG=../../build-wxWidgets-2.8.10.log

echo "[millipede] Building wxWidgets 2.8.10"

if [ -d wxWidgets-2.8.10 ]
then
echo "[millipede] ...Skipping archive extraction (already extracted)"
else
echo "[millipede] ...Extracting archive..."
/bin/rm -fR tmp
mkdir tmp
cd tmp
tar xzf ../setup/wxWidgets-2.8.10/wxWidgets-2.8.10.tar.gz
cd ..
mv tmp/wxWidgets-2.8.10 .
rmdir tmp
fi

cd wxWidgets-2.8.10

if [ -d build28 ]
then
echo "[millipede] ...Skipping build (already built)"
else
mkdir build28
cd build28

echo "[millipede] ...Configuring..."
arch_flags="-arch i386"
../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --disable-shared --with-opengl > $LOG 2>&1

echo "[millipede] ...Running build..."
make -j2 >> $LOG 2>&1
fi

echo "[millipede] ...Finished building wxWidgets 2.8.10."