moved build scripts to /scripts, added SCRIPT_DIR variable to make sure it gets executed properly
This commit is contained in:
parent
188afef5de
commit
498971e921
|
|
@ -1,6 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo build files will be placed in ./build
|
|
||||||
./third-party/premake5/premake5 premake-ninja
|
|
||||||
ninja $1 -C build
|
|
||||||
6
build.sh
6
build.sh
|
|
@ -1,6 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo build files will be placed in ./build
|
|
||||||
./third-party/premake5/premake5 gmake2
|
|
||||||
make -C build config=$1
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
if [ -z "$1" ] || [ $# -eq 0 ]
|
|
||||||
then
|
|
||||||
ninja -C build -t clean
|
|
||||||
else
|
|
||||||
ninja -C build -t clean $1
|
|
||||||
fi
|
|
||||||
7
clean.sh
7
clean.sh
|
|
@ -1,7 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
if [ -z "$1" ] || [ $# -eq 0 ]
|
|
||||||
then
|
|
||||||
make -C build config=Debug clean && make config=Release clean
|
|
||||||
else
|
|
||||||
make -C build config=$1 clean
|
|
||||||
fi
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
ECHO Project files will be written to ./build
|
ECHO Project files will be written to ./build
|
||||||
.\third-party\premake5\premake5.exe vs2022
|
..\third-party\premake5\premake5.exe vs2022
|
||||||
PAUSE
|
PAUSE
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
#! /bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
|
echo build files will be placed in /build
|
||||||
|
../third-party/premake5/premake5 premake-ninja && ninja $1 -C ../build
|
||||||
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
#! /bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
|
echo build files will be placed in ./build
|
||||||
|
./third-party/premake5/premake5 gmake2 && make -C ../build config=$1
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
|
if [ -z "$1" ] || [ $# -eq 0 ]
|
||||||
|
then
|
||||||
|
ninja -C ../build -t clean
|
||||||
|
else
|
||||||
|
ninja -C ../build -t clean $1
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
|
if [ -z "$1" ] || [ $# -eq 0 ]
|
||||||
|
then
|
||||||
|
make -C ../build config=Debug clean && make -C ../build config=Release clean
|
||||||
|
else
|
||||||
|
make -C ../build config=$1 clean
|
||||||
|
fi
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
if [ -z "$1" ] || [ $# -eq 0 ]
|
if [ -z "$1" ] || [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
./third-party/premake5/premake5 --config=Debug ecc
|
./third-party/premake5/premake5 --config=Debug ecc
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
require "ecc/ecc"
|
require "ecc/ecc"
|
||||||
require "ninja/ninja"
|
require "ninja/ninja"
|
||||||
|
|
||||||
package.path = package.path .. ";third-party/premake-scripts/?.lua"
|
package.path = package.path .. ";../third-party/premake-scripts/?.lua"
|
||||||
|
|
||||||
local ogg = require("build-ogg")
|
local ogg = require("build-ogg")
|
||||||
local sfml = require("build-sfml")
|
local sfml = require("build-sfml")
|
||||||
|
|
@ -13,11 +13,13 @@ local imguisfml = require("build-imgui-sfml")
|
||||||
|
|
||||||
local snake = require("project")
|
local snake = require("project")
|
||||||
|
|
||||||
|
local rootdir = "../"
|
||||||
|
|
||||||
workspace "snake"
|
workspace "snake"
|
||||||
architecture "x64"
|
architecture "x64"
|
||||||
startproject"snake"
|
startproject"snake"
|
||||||
configurations{"Debug", "Release"}
|
configurations{"Debug", "Release"}
|
||||||
location "build"
|
location (rootdir .. "build")
|
||||||
|
|
||||||
filter"system:linux"
|
filter"system:linux"
|
||||||
staticruntime"Off"
|
staticruntime"Off"
|
||||||
|
|
@ -32,9 +34,9 @@ workspace "snake"
|
||||||
|
|
||||||
|
|
||||||
output_dir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
|
output_dir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
|
||||||
intdir = "intermediate-files/"
|
intdir = rootdir .. "intermediate-files/"
|
||||||
bindir = "bin/" .. output_dir
|
bindir = rootdir .. "bin/" .. output_dir
|
||||||
liboutdir = "lib/" .. output_dir
|
liboutdir = rootdir.. "lib/" .. output_dir
|
||||||
|
|
||||||
externalwarnings "Off"
|
externalwarnings "Off"
|
||||||
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
local m = {}
|
local m = {}
|
||||||
|
|
||||||
local scriptdir = path.getabsolute(path.getdirectory(_SCRIPT))
|
local rootdir = path.join(path.getabsolute(path.getdirectory(_SCRIPT)), "../")
|
||||||
|
|
||||||
package.path = package.path .. ";third-party/premake-scripts/?.lua"
|
package.path = package.path .. ";../third-party/premake-scripts/?.lua"
|
||||||
|
|
||||||
local sfml = require("build-sfml")
|
local sfml = require("build-sfml")
|
||||||
local imgui = require("build-imgui")
|
local imgui = require("build-imgui")
|
||||||
|
|
@ -17,7 +17,7 @@ project "snake"
|
||||||
kind "WindowedApp"
|
kind "WindowedApp"
|
||||||
targetname "snake"
|
targetname "snake"
|
||||||
targetdir (bindir)
|
targetdir (bindir)
|
||||||
debugdir (scriptdir)
|
debugdir (rootdir)
|
||||||
objdir (intdir)
|
objdir (intdir)
|
||||||
|
|
||||||
-- link order matters on GCC/Clang
|
-- link order matters on GCC/Clang
|
||||||
|
|
@ -27,15 +27,15 @@ project "snake"
|
||||||
|
|
||||||
includedirs
|
includedirs
|
||||||
{
|
{
|
||||||
path.join(scriptdir, "src"),
|
path.join(rootdir, "src"),
|
||||||
path.join(scriptdir, "include"),
|
path.join(rootdir, "include"),
|
||||||
}
|
}
|
||||||
|
|
||||||
files
|
files
|
||||||
{
|
{
|
||||||
path.join(scriptdir, "src/**.cpp"),
|
path.join(rootdir, "src/**.cpp"),
|
||||||
path.join(scriptdir, "include/**.h"),
|
path.join(rootdir, "include/**.h"),
|
||||||
path.join(scriptdir, "include/**.hpp"),
|
path.join(rootdir, "include/**.hpp"),
|
||||||
}
|
}
|
||||||
|
|
||||||
--windows specific settings--
|
--windows specific settings--
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
|
../bin/$1-linux-x86_64/snake
|
||||||
Loading…
Reference in New Issue