|
Last change
on this file was 28187, checked in by Stan, 5 months ago |
|
Add a custom script to build premake, like NVTT, FCollada, and Spidermonkey.
Fix an issue on newer GNU/Linux and macOS where the build would fail due to missing unistd includes.
Fixes: #6847
Accepted by: @vv221
Comments by: @sera
Differential Revision: https://code.wildfiregames.com/D4894
|
-
Property svn:executable
set to
*
|
|
File size:
821 bytes
|
| Rev | Line | |
|---|
| [28187] | 1 | #!/bin/sh
|
|---|
| 2 | set -e
|
|---|
| 3 |
|
|---|
| 4 | LIB_VERSION="premake-5-alpha-14+wildfiregames.1"
|
|---|
| 5 |
|
|---|
| 6 | if [ -e .already-built ] && [ "$(cat .already-built)" = "${LIB_VERSION}" ]
|
|---|
| 7 | then
|
|---|
| 8 | echo "Premake 5 is already up to date."
|
|---|
| 9 | exit
|
|---|
| 10 | fi
|
|---|
| 11 |
|
|---|
| 12 | JOBS=${JOBS:="-j2"}
|
|---|
| 13 | MAKE=${MAKE:="make"}
|
|---|
| 14 | CFLAGS="${CFLAGS:=""} -Wno-error=implicit-function-declaration"
|
|---|
| 15 | OS="${OS:=$(uname -s)}"
|
|---|
| 16 |
|
|---|
| 17 | echo "Building Premake 5..."
|
|---|
| 18 | echo
|
|---|
| 19 |
|
|---|
| 20 | PREMAKE_BUILD_DIR=premake5/build/gmake2.unix
|
|---|
| 21 | # BSD and OS X need different Makefiles
|
|---|
| 22 | case "$OS" in
|
|---|
| 23 | "GNU/kFreeBSD" )
|
|---|
| 24 | # use default gmake2.unix (needs -ldl as we have a GNU userland and libc)
|
|---|
| 25 | ;;
|
|---|
| 26 | *"BSD" )
|
|---|
| 27 | PREMAKE_BUILD_DIR=premake5/build/gmake2.bsd
|
|---|
| 28 | ;;
|
|---|
| 29 | "Darwin" )
|
|---|
| 30 | PREMAKE_BUILD_DIR=premake5/build/gmake2.macosx
|
|---|
| 31 | ;;
|
|---|
| 32 | esac
|
|---|
| 33 | ${MAKE} -C "${PREMAKE_BUILD_DIR}" "${JOBS}" CFLAGS="$CFLAGS" config=release
|
|---|
| 34 |
|
|---|
| 35 | echo "${LIB_VERSION}" > .already-built
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.