From e8659962a52a5160a9312f2f39e738011abb30f7 Mon Sep 17 00:00:00 2001 From: cpunch Date: Mon, 26 Apr 2021 18:57:49 -0500 Subject: [PATCH] Switched makefile to use pkg-config --- Makefile | 8 +++++--- src/lua/LuaManager.hpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f15ff06..e6d0521 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,10 @@ CXX=clang++ # -w suppresses all warnings (the part that's commented out helps me find memory leaks, it ruins performance though!) # If compiling with ASAN, invoke like this: $ LSAN_OPTIONS=suppressions=suppr.txt bin/fusion CFLAGS=-O3 #-g3 -fsanitize=address -CXXFLAGS=-Wall -Wno-unknown-pragmas -std=c++17 -O2 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(GIT_VERSION)\" -I./src -I./vendor #-g3 -fsanitize=address -LDFLAGS=-lpthread -lsqlite3 -lluajit-5.1 -lstdc++fs #-g3 -fsanitize=address +LCFLAGS=`pkg-config --cflags luajit` +LLIBFLAGS=`pkg-config --libs luajit` +CXXFLAGS=-Wall -Wno-unknown-pragmas -std=c++17 -O2 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(GIT_VERSION)\" -I./src -I./vendor $(LCFLAGS) #-g3 -fsanitize=address +LDFLAGS=-lpthread -lsqlite3 $(LLIBFLAGS) -lstdc++fs #-g3 -fsanitize=address # specifies the name of our exectuable SERVER=bin/fusion @@ -19,7 +21,7 @@ WIN_CC=x86_64-w64-mingw32-gcc WIN_CXX=x86_64-w64-mingw32-g++ WIN_CFLAGS=-O3 #-g3 -fsanitize=address WIN_CXXFLAGS=-D_WIN32_WINNT=0x0601 -Wall -Wno-unknown-pragmas -std=c++17 -O3 -DPROTOCOL_VERSION=$(PROTOCOL_VERSION) -DGIT_VERSION=\"$(GIT_VERSION)\" -I./src -I./vendor #-g3 -fsanitize=address -WIN_LDFLAGS=-static -lws2_32 -lwsock32 -lsqlite3 -lluajit-5.1 -lstdc++fs #-g3 -fsanitize=address +WIN_LDFLAGS=-static -lws2_32 -lwsock32 -lsqlite3 $(LLIBFLAGS) -lstdc++fs #-g3 -fsanitize=address WIN_SERVER=bin/winfusion.exe # C code; currently exclusively from vendored libraries diff --git a/src/lua/LuaManager.hpp b/src/lua/LuaManager.hpp index baadbaa..38f9b9f 100644 --- a/src/lua/LuaManager.hpp +++ b/src/lua/LuaManager.hpp @@ -6,7 +6,7 @@ #ifdef _WIN32 #include #else - #include + #include #endif typedef int lRegistry;