aboutsummaryrefslogtreecommitdiff
path: root/tools/makefile.go
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-07-03 10:10:27 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-07-03 10:46:43 -0300
commite65dc561acab7a9e49f59777f16cb040c574c64d (patch)
tree2206c066b97b1948a4b98647c91a369d3b9863c8 /tools/makefile.go
parente782274ade8d7307e157a997d6ac3bcaa4130024 (diff)
downloadgame-e65dc561acab7a9e49f59777f16cb040c574c64d.tar.gz
game-e65dc561acab7a9e49f59777f16cb040c574c64d.zip
implement `crypto.cc` with OpenSSL + fix config loading
I considered reversing the original `vlong` implementation but OpenSSL is just simpler, more secure, and most importantly, is already there. I also made it so the key is now stored in a PEM file (`tibia.pem`) so it can be easily swapped without re-compiling. This was the last piece to build and run a working executable, except that we now need to implement a query manager for the server to communicate with. I was able to fix a small problem with loading the config before hitting the problem with the query manager, which was expected. The next task should be getting a query manager up and running before starting phase two of upgrading and fixing the server itself.
Diffstat (limited to 'tools/makefile.go')
-rw-r--r--tools/makefile.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/makefile.go b/tools/makefile.go
index 1e005d5..255bbcf 100644
--- a/tools/makefile.go
+++ b/tools/makefile.go
@@ -21,11 +21,13 @@ var (
"-Wno-unused-parameter",
"-Wno-format-truncation",
"-std=c++11",
+ "-pthread",
"-DOS_LINUX=1",
"-DARCH_X64=1",
}
linkerOptions = []string{
"-Wl,-t",
+ "-lcrypto",
}
)
@@ -93,7 +95,7 @@ func main() {
fmt.Fprintf(&output, " $(BUILDDIR)/%v", object.obj)
}
fmt.Fprint(&output, "\n")
- fmt.Fprint(&output, "\t$(CC) $(CFLAGS) $(LFLAGS) -o $@ $^\n\n")
+ fmt.Fprint(&output, "\t$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)\n\n")
// OBJECTS
for _, object := range objectFiles {