summaryrefslogtreecommitdiff
path: root/build_sgg.sh
blob: 576bc9bde139f0018d9c54b221765ab1d18bfab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

CC=g++
LD=g++
AR=ar
BUILD_PATH="build"
LIB_PATH="lib"
CFLAGS="-O2"

mkdir -p $LIB_PATH
mkdir -p $BUILD_PATH
mkdir -p $BUILD_PATH/sgg

$CC -c $CFLAGS -I3rdparty/include graphics/graphics.cpp -o $BUILD_PATH/sgg/graphics.o
$CC -c $CFLAGS -I3rdparty/include graphics/GLbackend.cpp -o $BUILD_PATH/sgg/GLbackend.o
$CC -c $CFLAGS -I3rdparty/include graphics/shader.cpp -o $BUILD_PATH/sgg/shader.o
$CC -c $CFLAGS -I3rdparty/include graphics/texture.cpp -o $BUILD_PATH/sgg/texture.o
$CC -c $CFLAGS -I3rdparty/include graphics/audio.cpp -o $BUILD_PATH/sgg/audio.o
$CC -c $CFLAGS -I3rdparty/include graphics/AudioManager.cpp -o $BUILD_PATH/sgg/AudioManager.o
$CC -c $CFLAGS -I3rdparty/include graphics/lodepng.cpp -o $BUILD_PATH/sgg/lodepng.o
$CC -c $CFLAGS -I3rdparty/include graphics/fonts.cpp -o $BUILD_PATH/sgg/fonts.o

$AR rcs $LIB_PATH/libsgg.a $BUILD_PATH/sgg/*.o