Use at your own risk!
cd workdir unzip readline-4.3-2-mswin32.zip tar xzf ..\mrbayes-3.1.2.tar.gz cd mrbayes-3.1.2 copy ..\readline-4.3-2-mswin32\lib\readline-static.lib md readline xcopy ..\readline-4.3-2-mswin32\include\readline .
Make the Makefile as the following.
CC = cl CFLAGS = /MD /DWIN_VERSION /DUSE_READLINE \ /I. /DREADLINE_STATIC all: mrbayes.exe mrbayes.exe: mb.obj bayes.obj command.obj mbmath.obj \ mcmc.obj model.obj plot.obj sump.obj sumt.obj link /OPT:REF /OUT:mrbayes.exe *.obj \ readline-static.lib user32.lib advapi32.lib mb.obj: mb.c bayes.obj: bayes.c command.obj: command.c mbmath.obj: mbmath.c mcmc.obj: mcmc.c model.obj: model.c plot.obj: plot.c sump.obj: sump.c sumt.obj: sumt.c
Add the following line to line 7,364.
#define strncasecmp _strnicmp
Type the following in workdir\mrbayes-3.1.2.
nmake
tar xzf ncurses-5.6.tar.gz cd ncurses-5.6 CFLAGS=-isysroot\ /Developer/SDKs/MacOSX10.4u.sdk \ -arch i386 -arch ppc \ CXXFLAGS=$CFLAGS \ ./configure --prefix=/usr/local/ppc \ --with-normal --without-shared --without-debug \ --without-cxx --without-cxx-binding make sudo make install cd ..
tar xzf readline-5.2.tar.gz CFLAGS=-isysroot\ /Developer/SDKs/MacOSX10.4u.sdk \ -arch i386 -arch ppc \ -I/usr/local/fat/include \ CXXFLAGS=$CFLAGS \ LDFLAGS=-L/usr/local/fat/lib \ ./configure --prefix=/usr/local/fat \ --enable-static --disable-shared make sudo make install cd ..
cp Makefile Makefile-ppc cp Makefile Makefile-i386
Modify Makefile-ppc as the followings.
18: OPTFLAGS=-O2 -pipe -fomit-frame-pointer \ -frerun-loop-opt -finline-functions -fforce-addr \ -isysroot /Developer/SDKs/MacOSX10.4u.sdk \ -arch ppc -faltivec 22: CC = gcc -I/usr/local/fat/include 52: LIBS += /usr/local/fat/lib/libreadline.a /usr/local/fat/lib/libncurses.a
Modify Makefile-i386 as the followings.
18: OPTFLAGS=-O2 -pipe -fomit-frame-pointer \ -frerun-loop-opt -finline-functions -fforce-addr \ -isysroot /Developer/SDKs/MacOSX10.4u.sdk \ -arch i386 -mfpmath=sse -msse3 22: CC = gcc -I/usr/local/fat/include 52: LIBS += /usr/local/fat/lib/libreadline.a /usr/local/fat/lib/libncurses.a
make -f Makefile-ppc mv ./mb ./mb-ppc rm *.o make -f Makefile-i386 mv ./mb ./mb-i386 rm *.o lipo -create ./mb-ppc ./mb-i386 -output ./mb
Enabling SwapAdjacent and NSwaps options of MCMC / MCMCP command, and adding SwapDescendAll option to MCMC / MCMCP command.
Download this patche file to MrBayes source code directory. And type the following in the directory.
patch < ../mrbayes-3.1.2.mod.diff
Then, you can compile the modified version of MrBayes.