db1a526e8bf802d09f5d39b3c6cf86375dcd7d59
1 # Copyright (C) 2021 Harry Godden (hgn) - All Rights Reserved
6 libs
="-lGL -lglfw -lX11 -lXxf86vm -lXrandr -lm -lpthread -lXi -ldl" # -l:steam/libsteam_api.so"
7 flags
="-fsanitize=address -ggdb3 -Wno-unused-function -DNO_STEAM"
9 if [[ "$OSTYPE" != "linux-gnu"* ]]; then
10 echo "Operating system is not GNU/Linux, windows will be assumed."
11 target
="fishladder.exe"
12 libs
="-lglfw3 -lopengl32 -lm -mwindows"
13 flags
="-ggdb3 -Wno-unused-function -DNO_STEAM"
34 echo "Unkown param: $1"
42 if [ "$do_build" = true
]; then
43 gcc
-Wall -Wstrict-aliasing=3 $lib $flags $src gl
/glad.c
-o $target $libs -Wl,-rpath=.
/ $defines
46 echo "GCC build failed"
50 echo "Build succeeded"
53 if [[ "$OSTYPE" == "linux-gnu"* ]]; then
54 # Directories to initialize
55 mkdir build.linux
/cfg
-p
56 mkdir build.linux
/textures
-p
58 cp $target .
/build.linux
/$target
59 cp .
/steam
/libsteam_api.so .
/build.linux
/libsteam_api.so
60 cp -r .
/textures
/ .
/build.linux
/
62 if [ "$run_after" = true
]; then
70 mkdir build.win32
/cfg
-p
71 mkdir build.win32
/textures
-p
73 cp $target .
/build.win32
/$target
74 cp -r .
/textures
/ .
/build.win32
/
75 cp .
/lib
/glfw3.dll .
/build.win32
/glfw3.dll
77 if [ "$run_after" = true
]; then