|
|
@ -1,146 +0,0 @@ |
|
|
|
## |
|
|
|
## Compilation |
|
|
|
## |
|
|
|
|
|
|
|
C++ = clang++ ; |
|
|
|
LINK = clang++ ; |
|
|
|
# C++ = g++ ; |
|
|
|
# LINK = g++ ; |
|
|
|
|
|
|
|
if $(UNIX) { SUFSHR = .so ; } |
|
|
|
else if $(NT) { SUFSHR = .dll ; } |
|
|
|
|
|
|
|
if $(CROSS_COMPILE_WINDOWS) |
|
|
|
{ |
|
|
|
C++ = x86_64-w64-mingw32-g++ ; |
|
|
|
LINK = x86_64-w64-mingw32-g++ ; |
|
|
|
AR = x86_64-w64-mingw32-ar ; |
|
|
|
SUFEXE = .exe ; |
|
|
|
|
|
|
|
OS_DEPENDENT_C++FLAGS = -DWINDOWS ; |
|
|
|
OS_DEPENDENT_LINKLIBS = ; |
|
|
|
OS_DEPENDENT_LINKFLAGS = --export-all-symbols ; |
|
|
|
|
|
|
|
MINGW_LIB_PATH = /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32 ; |
|
|
|
OS_DEPENDENT_DLLS = |
|
|
|
$(MINGW_LIB_PATH)/libgcc_s_seh-1.dll |
|
|
|
$(MINGW_LIB_PATH)/libstdc++-6.dll ; |
|
|
|
} |
|
|
|
else if $(UNIX) |
|
|
|
{ |
|
|
|
OS_DEPENDENT_C++FLAGS = -DUNIX ; |
|
|
|
# For dynamic loading: ldl loads, export-dynamic lets the loaded code resolve its symbols to the loader's code |
|
|
|
OS_DEPENDENT_LINKLIBS = -ldl ; |
|
|
|
OS_DEPENDENT_LINKFLAGS = --export-dynamic ; |
|
|
|
OS_DEPENDENT_DLLS = ; |
|
|
|
} |
|
|
|
else if $(NT) |
|
|
|
{ |
|
|
|
OS_DEPENDENT_C++FLAGS = -DWINDOWS ; |
|
|
|
# TODO: Windows support |
|
|
|
OS_DEPENDENT_LINKLIBS = ; |
|
|
|
OS_DEPENDENT_LINKFLAGS = ; |
|
|
|
OS_DEPENDENT_DLLS = ; |
|
|
|
} |
|
|
|
|
|
|
|
if $(DEBUG_BUILD) |
|
|
|
{ |
|
|
|
OGRE_BUILD_DIR = Dependencies/ogre-next/build/Debug ; |
|
|
|
OGRE_C++FLAGS = -DOGRE_DEBUG_MODE=1 ; |
|
|
|
OGRE_HDRS = Dependencies/ogre-next/OgreMain/include |
|
|
|
Dependencies/ogre-next/Components/Hlms/Common/include |
|
|
|
Dependencies/ogre-next/Components/Hlms/Pbs/include |
|
|
|
Dependencies/ogre-next/Components/Hlms/Unlit/include |
|
|
|
Dependencies/ogre-next/build/Debug/include |
|
|
|
# Ogre overlay |
|
|
|
Dependencies/ogre-next/Components/Overlay/include ; |
|
|
|
OGRE_LINKLIBS = |
|
|
|
-lOgreHlmsPbs_d |
|
|
|
-lOgreHlmsUnlit_d |
|
|
|
-lOgreMain_d |
|
|
|
# Ogre 2D overlays |
|
|
|
-lOgreOverlay_d ; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
OGRE_BUILD_DIR = Dependencies/ogre-next/build/Release ; |
|
|
|
OGRE_C++FLAGS = -DOGRE_DEBUG_MODE=0 ; |
|
|
|
OGRE_HDRS = Dependencies/ogre-next/OgreMain/include |
|
|
|
Dependencies/ogre-next/Components/Hlms/Common/include |
|
|
|
Dependencies/ogre-next/Components/Hlms/Pbs/include |
|
|
|
Dependencies/ogre-next/Components/Hlms/Unlit/include |
|
|
|
Dependencies/ogre-next/build/Release/include |
|
|
|
# Ogre overlay |
|
|
|
Dependencies/ogre-next/Components/Overlay/include ; |
|
|
|
OGRE_LINKLIBS = -lOgreHlmsPbs |
|
|
|
-lOgreHlmsUnlit |
|
|
|
-lOgreMain |
|
|
|
# Ogre 2D overlays |
|
|
|
-lOgreOverlay ; |
|
|
|
} |
|
|
|
|
|
|
|
HDRS = src |
|
|
|
$(OGRE_HDRS) ; |
|
|
|
|
|
|
|
# Arguments used on all projects, regardless of any variables |
|
|
|
C++FLAGS = -std=c++11 -Wall -Wextra -Wno-unused-parameter |
|
|
|
# Only for profiling, i.e. not release builds |
|
|
|
# -DTRACY_ENABLE |
|
|
|
-g |
|
|
|
# Needed for dynamic linking |
|
|
|
-fPIC |
|
|
|
|
|
|
|
$(OGRE_C++FLAGS) |
|
|
|
|
|
|
|
$(OS_DEPENDENT_C++FLAGS) |
|
|
|
; |
|
|
|
|
|
|
|
# TODO: Make base hold all this weirdness? |
|
|
|
# if $(DEBUG_BUILD) |
|
|
|
# { |
|
|
|
# SFML_LINKLIBS = -lsfml-audio-d -lsfml-graphics-d -lsfml-window-d -lsfml-system-d ; |
|
|
|
# } |
|
|
|
# else |
|
|
|
# { |
|
|
|
# SFML_LINKLIBS = -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-system ; |
|
|
|
# } |
|
|
|
|
|
|
|
OPTIM = -O0 ; |
|
|
|
|
|
|
|
## |
|
|
|
## Linking |
|
|
|
## |
|
|
|
|
|
|
|
LINKLIBS = |
|
|
|
# Standard (e.g. for Tracy) |
|
|
|
-lpthread |
|
|
|
# Functions for dynamically loading libraries (UNIX) |
|
|
|
$(OS_DEPENDENT_LINKLIBS) |
|
|
|
|
|
|
|
-L$(OGRE_BUILD_DIR)/lib |
|
|
|
$(OGRE_LINKLIBS) |
|
|
|
; |
|
|
|
|
|
|
|
LINKFLAGS = -g |
|
|
|
# -Wl = pass to linker |
|
|
|
# --export-dynamic = Export all symbols so dynamically loaded code can resolve their symbols to ours |
|
|
|
-Wl,-rpath,.,$(OS_DEPENDENT_LINKFLAGS):$(OGRE_BUILD_DIR)/lib |
|
|
|
; |
|
|
|
## |
|
|
|
## Jam stuff |
|
|
|
## |
|
|
|
|
|
|
|
# Fix for unnecessary rebuilding any Jam project |
|
|
|
KEEPOBJS = true ; # This doesn't actually fix anything, though it seems like it should |
|
|
|
NOARSCAN = true ; # This actually fixes the problem |
|
|
|
#AR = ar rUu ; # I was thinking maybe the AR command was wrong (always outputting deterministically) |
|
|
|
# It doesn't seem like this is the problem though |
|
|
|
AR = ar cr ; |
|
|
|
|
|
|
|
# Some helpful Jam commands |
|
|
|
# -q : stop on failed target |
|
|
|
# -jN : use N cores |
|
|
|
# -sVAR=VAL : Set VAR to VAL. Note that setting WINDOWS=false is the same as setting WINDOWS=true, |
|
|
|
# frustratingly (as if it's an ifdef not an if x = y |
|
|
|
# -dx : print commands being used |
|
|
|
# -n : don't actually run commands |