Build assembly files with AMBuild. (#481)

* Remove prebuilt nasm-generated object files from the tree, and use AMBuild to compile them.

* Add commands in VS project to build the object files

* Rename elf to elf32 for consistency
This commit is contained in:
David Anderson
2018-08-26 11:28:25 -07:00
committed by Vincent Herbet
parent 9bcabfeb1f
commit 46d1ef68bd
21 changed files with 127 additions and 32 deletions

View File

@ -5,6 +5,22 @@ if [ ! -d "amxmodx" ]; then
git clone --recursive https://github.com/alliedmodders/amxmodx.git
fi
if [ ! -d "amxmodx/build_deps" ]; then
mkdir amxmodx/build_deps
fi
download_archive ()
{
if [ `command -v wget` ]; then
wget "$url" -O "$dest"
elif [ `command -v curl` ]; then
curl -o $dest $url
else
echo "Failed to locate wget or curl. Please install one of these programs."
exit 1
fi
}
if [ "$1" != "--no-mysql" ]; then
ismac=0
iswin=0
@ -34,14 +50,9 @@ if [ "$1" != "--no-mysql" ]; then
fi
if [ ! -d "mysql-5.5" ]; then
if [ `command -v wget` ]; then
wget $mysqlurl -O mysql.$archive_ext
elif [ `command -v curl` ]; then
curl -o mysql.$archive_ext $mysqlurl
else
echo "Failed to locate wget or curl. Install one of these programs to download MySQL."
exit 1
fi
url=$mysqlurl
dest=mysql.$archive_ext
download_archive
$decomp mysql.$archive_ext
mv $mysqlver mysql-5.5
rm mysql.$archive_ext
@ -95,3 +106,15 @@ if [ $? -eq 1 ]; then
python setup.py install --user
fi
fi
if [ $iswin -eq 1 ]; then
if [ ! -d "amxmodx/build_deps/nasm-2.13.03" ]; then
url=http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win32/nasm-2.13.03-win32.zip
dest=amxmodx/build_deps/nasm-2.13.03-win32.zip
download_archive
cd amxmodx/build_deps
unzip nasm-2.13.03-win32.zip
rm nasm-2.13.03-win32.zip
mv nasm-2.13.03 nasm
fi
fi