Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
set -xe

CC="${CXX:-cc}"
PKGS="sdl2 glew freetype2"
CFLAGS="-Wall -Wextra -std=c11 -pedantic -ggdb"
PKGS="sdl2 freetype2"
CFLAGS="-Wall -Wextra -std=c11 -pedantic -ggdb -Ideps"
LIBS=-lm
SRC="src/main.c src/la.c src/editor.c src/file_browser.c src/free_glyph.c src/simple_renderer.c src/common.c src/lexer.c"

if [ `uname` = "Darwin" ]; then
CFLAGS+=" -framework OpenGL"
else
PKGS="$PKGS gl"
fi


$CC $CFLAGS `pkg-config --cflags $PKGS` -o ded $SRC $LIBS `pkg-config --libs $PKGS`
2 changes: 1 addition & 1 deletion build_msvc.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
rem launch this from msvc-enabled console

set CFLAGS=/W4 /WX /std:c11 /wd4996 /wd5105 /FC /TC /Zi /nologo
set INCLUDES=/I dependencies\SDL2\include /I dependencies\GLFW\include /I dependencies\GLEW\include
set INCLUDES=/I dependencies\SDL2\include /I dependencies\GLFW\include /I dependencies\GLEW\include /I deps
set LIBS=dependencies\SDL2\lib\x64\SDL2.lib ^
dependencies\SDL2\lib\x64\SDL2main.lib ^
dependencies\GLFW\lib\glfw3.lib ^
Expand Down
4 changes: 2 additions & 2 deletions build_msys2_mingw64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -xe

PKGS="--static sdl2 glew freetype2"
CFLAGS="-Wall -Wextra -pedantic -ggdb -DGLEW_STATIC `pkg-config --cflags $PKGS` -Isrc -Dassert(expression)=((void)0) "
PKGS="--static sdl2 freetype2"
CFLAGS="-Wall -Wextra -pedantic -ggdb `pkg-config --cflags $PKGS` -Isrc -Ideps -Dassert(expression)=((void)0) "
LIBS="-lm -lopengl32 `pkg-config --libs $PKGS`"
SRC="src/main.c src/la.c src/editor.c src/file_browser.c src/free_glyph.c src/simple_renderer.c src/common.c"
OBJ=$(echo "$SRC" | sed "s/\.c/\.o/g")
Expand Down
Loading