Pull in Ox as git subtree
This commit is contained in:
1
deps/ox/scripts/check
vendored
Executable file
1
deps/ox/scripts/check
vendored
Executable file
@ -0,0 +1 @@
|
||||
clang-check `find . | grep "\.cpp" | grep -v CMakeFiles | grep -v editormodels\.cpp`
|
8
deps/ox/scripts/cibuild
vendored
Executable file
8
deps/ox/scripts/cibuild
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
make -j release
|
||||
make -j debug
|
||||
make -j
|
||||
make -j test
|
16
deps/ox/scripts/newcpp
vendored
Executable file
16
deps/ox/scripts/newcpp
vendored
Executable file
@ -0,0 +1,16 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
sys.exit(1)
|
||||
|
||||
pkg = sys.argv[1]
|
||||
name = sys.argv[2]
|
||||
ifdef = "WOMBAT_%s_%s_HPP" % (pkg.upper(), name.upper())
|
||||
namespace = "namespace wombat {\nnamespace %s {\n\n}\n}" % pkg
|
||||
hpp = "#ifndef %s\n#define %s\n\n%s\n\n#endif" % (ifdef, ifdef, namespace)
|
||||
cpp = "#include \"%s.hpp\"\n\n%s" % (name, namespace)
|
||||
|
||||
open("src/%s/%s.hpp" % (pkg, name), "w").write(hpp)
|
||||
open("src/%s/%s.cpp" % (pkg, name), "w").write(cpp)
|
30
deps/ox/scripts/setup_build
vendored
Executable file
30
deps/ox/scripts/setup_build
vendored
Executable file
@ -0,0 +1,30 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
project=$(pwd)/
|
||||
|
||||
TARGET=$1
|
||||
BUILD_TYPE=$2
|
||||
|
||||
if [[ $TARGET == windows ]]; then
|
||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/Mingw.cmake"
|
||||
elif [[ $TARGET == gba ]]; then
|
||||
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/GBA.cmake -DOX_USE_STDLIB=OFF -DCMAKE_INSTALL_PREFIX=$DEVKITARM"
|
||||
fi
|
||||
|
||||
if [[ $BUILD_TYPE == debug ]]; then
|
||||
buildTypeArgs="-DUSE_ASAN=ON -DCMAKE_BUILD_TYPE=Debug"
|
||||
buildDir="build/${TARGET}-debug"
|
||||
else
|
||||
buildTypeArgs="-DCMAKE_BUILD_TYPE=Release"
|
||||
buildDir="build/${TARGET}-release"
|
||||
fi
|
||||
|
||||
mkdir -p $buildDir
|
||||
pushd $buildDir
|
||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
$buildTypeArgs \
|
||||
$toolchain \
|
||||
$project
|
||||
popd
|
Reference in New Issue
Block a user