-
Notifications
You must be signed in to change notification settings - Fork 0
Building an autotools package: throwaway version
Tony Theodore edited this page Sep 17, 2015
·
6 revisions
Throwaway build to see how MXE works before setting up permanently.
export MXE_DIR=~/tmp/mxe
rm -rf $MXE_DIR
git clone --depth 1 --branch master https://github.com/mxe/mxe.git $MXE_DIR
export MXE_TARGETS='i686-pc-mingw32.static i686-pc-mingw32.shared'
make -C $MXE_DIR MXE_TARGETS="$MXE_TARGETS" curl pthreads pdcurses
There is also a copy in $MXE_DIR/index.html
unset `env | \
grep -vi '^EDITOR=\|^HOME=\|^LANG=\|MXE\|^PATH=' | \
grep -vi 'PKG_CONFIG\|PROXY\|^PS1=\|^TERM=' | \
cut -d '=' -f1 | tr '\n' ' '`
export PATH=$MXE_DIR/usr/bin:$PATH
export CGMINER_DIR=~/tmp/cgminer
export INSTALL_PREFIX=$CGMINER_DIR/../usr/local
rm -rf $CGMINER_DIR
git clone --depth 1 --branch master https://github.com/ckolivas/cgminer.git $CGMINER_DIR
cd $CGMINER_DIR && autoreconf -fi
for tgt in $MXE_TARGETS; do \
rm -rf $CGMINER_DIR.$tgt.build && \
mkdir $CGMINER_DIR.$tgt.build && \
cd $CGMINER_DIR.$tgt.build && \
$CGMINER_DIR/configure \
--prefix=$INSTALL_PREFIX/$tgt \
--host=$tgt \
`[[ $tgt =~ static ]] && echo --disable-shared` \
--enable-avalon \
CFLAGS="`$tgt-curl-config --cflags`" && \
make -j8 && \
make install; \
done
Confirm the newly installed executables
file $INSTALL_PREFIX/*/bin/* | sed "s,$INSTALL_PREFIX/,,"
ls -lh $INSTALL_PREFIX/*/bin/* | sed "s,$INSTALL_PREFIX/,,"
You should now be able to copy the contents of $INSTALL_PREFIX to a windows machine and test the executables.
MXE is not relocatable, so move the pkg directory from $MXE_DIR to the final installation path before deleting $MXE_DIR.