-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·53 lines (44 loc) · 936 Bytes
/
Copy pathrun.sh
File metadata and controls
executable file
·53 lines (44 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
set -e
echo "=== Goliath Game Engine ==="
echo ""
echo "Building complete application..."
echo ""
# Clean and create build directory
rm -rf build
mkdir build
pushd build
CFLAGS="$(sdl2-config --cflags)"
LDFLAGS="$(sdl2-config --libs)"
# Step 1: Build game library
echo "Building game library..."
clang++ \
-DGOLIATH_INTERNAL=1 \
-DGOLIATH_SLOW=1 \
-dynamiclib \
-undefined dynamic_lookup \
-install_name @rpath/libgoliath.dylib \
-o libgoliath.dylib \
../src/goliath.cpp
# Step 2: Build platform layer
echo "Building platform layer..."
clang++ \
-DGOLIATH_INTERNAL=1 \
-DGOLIATH_SLOW=1 \
$CFLAGS \
../src/sdl_goliath.cpp \
$LDFLAGS \
-L. \
-lgoliath \
-Wl,-rpath,@executable_path \
-o goliath
popd
echo ""
echo "Build complete!"
echo " Library: build/libgoliath.dylib"
echo " Executable: build/goliath"
echo ""
echo "=== Running Goliath ==="
echo ""
# Run the game
./build/goliath