aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-09-13 00:37:10 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-09-13 00:39:31 -0300
commit465620a871e7da8d72d82a999eac8623570d13fd (patch)
treed66a0d17556630e88730488b5223823adef19b03 /tools
parent16f2e00b055c8356a7e80fa3b92e7df5a5c89a4c (diff)
downloadgame-465620a871e7da8d72d82a999eac8623570d13fd.tar.gz
game-465620a871e7da8d72d82a999eac8623570d13fd.zip
add `MAX_DEPOTS` constant + enable assertions in debug mode
Diffstat (limited to 'tools')
-rw-r--r--tools/makefile.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/makefile.go b/tools/makefile.go
index 6b0ad55..b76efcf 100644
--- a/tools/makefile.go
+++ b/tools/makefile.go
@@ -26,7 +26,9 @@ var (
"-DOS_LINUX=1",
"-DARCH_X64=1",
}
- linkerOptions = []string{
+ debugOptions = []string{"-g", "-Og", "-DENABLE_ASSERTIONS=1"}
+ releaseOptions = []string{"-O2"}
+ linkerOptions = []string{
"-Wl,-t",
"-lcrypto",
}
@@ -78,9 +80,9 @@ func main() {
// DEBUG SWITCH
fmt.Fprint(&output, "DEBUG ?= 0\n")
fmt.Fprint(&output, "ifneq ($(DEBUG), 0)\n")
- fmt.Fprint(&output, "\tCFLAGS += -g -Og\n")
+ fmt.Fprintf(&output, "\tCFLAGS += %v\n", strings.Join(debugOptions, " "))
fmt.Fprint(&output, "else\n")
- fmt.Fprint(&output, "\tCFLAGS += -O2\n")
+ fmt.Fprintf(&output, "\tCFLAGS += %v\n", strings.Join(releaseOptions, " "))
fmt.Fprint(&output, "endif\n\n")
// HEADERS