Skip to content

Commit

Permalink
got debugging to work
Browse files Browse the repository at this point in the history
  • Loading branch information
JJJHolscher committed Aug 20, 2023
1 parent 994c497 commit 145c6b8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
end_of_line = lf

[*.{cpp,h,lua,txt,glsl,md,c,cmake,java,gradle}]
charset = utf8
charset = utf-8
indent_size = 4
indent_style = tab
insert_final_newline = true
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ MINETESTER_VERSION := 0.0.1
SDL2_CMAKE_FILE := lib/SDL/build/lib/cmake/SDL2/sdl2-config.cmake
ZMQPP_LIB_FILE := lib/zmqpp/build/max-g++/libzmqpp.a
MINETEST_BINARY := bin/minetest
DEBUG_BINARY := bin/minetest_debug
MINETESTER_WHEEL := build/package/wheel/minetester-$(MINETESTER_VERSION)-py3-none-any.whl

default: minetest
Expand Down Expand Up @@ -44,6 +45,11 @@ $(MINETEST_BINARY):

minetest: $(MINETEST_BINARY)

$(DEBUG_BINARY):
util/minetester/build_debuggable_minetest.sh

debug: $(DEBUG_BINARY)

$(MINETESTER_WHEEL):
#build minetester python library
util/minetester/build_minetester.sh
Expand All @@ -58,6 +64,9 @@ demo:
#install run demo script
python -m minetester.scripts.test_loop

ctags:
ctags --extras=+f -R --links=no .

clean:
#clean up repo
util/minetester/clean.sh
Expand Down
17 changes: 17 additions & 0 deletions util/minetester/build_debuggable_minetest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /bin/sh
ROOT=$(pwd)

mkdir -p build/debug

cd build/debug


SDL2_DIR=${ROOT}/lib/SDL/build/lib/cmake/SDL2/

echo ${SDL2_DIR}

cmake ../.. -DRUN_IN_PLACE=TRUE -DBUILD_HEADLESS=1 -DSDL2_DIR=$SDL2_DIR -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j$(( $(nproc) > 1 ? $(nproc) - 1 : 1 ))

cd ../..
mv bin/minetest bin/debug

0 comments on commit 145c6b8

Please sign in to comment.