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 Project files will be written to ./build
|
||||
.\third-party\premake5\premake5.exe vs2022
|
||||
..\third-party\premake5\premake5.exe vs2022
|
||||
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
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
if [ -z "$1" ] || [ $# -eq 0 ]
|
||||
then
|
||||
./third-party/premake5/premake5 --config=Debug ecc
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
require "ecc/ecc"
|
||||
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 sfml = require("build-sfml")
|
||||
|
|
@ -13,11 +13,13 @@ local imguisfml = require("build-imgui-sfml")
|
|||
|
||||
local snake = require("project")
|
||||
|
||||
local rootdir = "../"
|
||||
|
||||
workspace "snake"
|
||||
architecture "x64"
|
||||
startproject"snake"
|
||||
configurations{"Debug", "Release"}
|
||||
location "build"
|
||||
location (rootdir .. "build")
|
||||
|
||||
filter"system:linux"
|
||||
staticruntime"Off"
|
||||
|
|
@ -32,9 +34,9 @@ workspace "snake"
|
|||
|
||||
|
||||
output_dir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
|
||||
intdir = "intermediate-files/"
|
||||
bindir = "bin/" .. output_dir
|
||||
liboutdir = "lib/" .. output_dir
|
||||
intdir = rootdir .. "intermediate-files/"
|
||||
bindir = rootdir .. "bin/" .. output_dir
|
||||
liboutdir = rootdir.. "lib/" .. output_dir
|
||||
|
||||
externalwarnings "Off"
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
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 imgui = require("build-imgui")
|
||||
|
|
@ -17,7 +17,7 @@ project "snake"
|
|||
kind "WindowedApp"
|
||||
targetname "snake"
|
||||
targetdir (bindir)
|
||||
debugdir (scriptdir)
|
||||
debugdir (rootdir)
|
||||
objdir (intdir)
|
||||
|
||||
-- link order matters on GCC/Clang
|
||||
|
|
@ -27,15 +27,15 @@ project "snake"
|
|||
|
||||
includedirs
|
||||
{
|
||||
path.join(scriptdir, "src"),
|
||||
path.join(scriptdir, "include"),
|
||||
path.join(rootdir, "src"),
|
||||
path.join(rootdir, "include"),
|
||||
}
|
||||
|
||||
files
|
||||
{
|
||||
path.join(scriptdir, "src/**.cpp"),
|
||||
path.join(scriptdir, "include/**.h"),
|
||||
path.join(scriptdir, "include/**.hpp"),
|
||||
path.join(rootdir, "src/**.cpp"),
|
||||
path.join(rootdir, "include/**.h"),
|
||||
path.join(rootdir, "include/**.hpp"),
|
||||
}
|
||||
|
||||
--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