Switched makefile to use pkg-config

This commit is contained in:
cpunch 2021-04-26 18:57:49 -05:00 committed by gsemaj
parent 2090062c75
commit e8659962a5
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -6,7 +6,7 @@
#ifdef _WIN32
#include <luajit/lua.hpp>
#else
#include <luajit-2.1/lua.hpp>
#include <lua.hpp>
#endif
typedef int lRegistry;