##
|
|
## Compilation
|
|
##
|
|
|
|
C++ = clang++ ;
|
|
LINK = clang++ ;
|
|
# C++ = g++ ;
|
|
# LINK = g++ ;
|
|
|
|
# If I was building a library, these would be useful
|
|
# LINKFLAGS = -shared ;
|
|
# if $(UNIX) { SUFSHR = .so ; }
|
|
# else if $(NT) { SUFSHR = .dll ; }
|
|
|
|
## Compiler arguments
|
|
|
|
# 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
|
|
# BT_USE_DOUBLE_PRECISION solves the Dantzig LCP missing definition
|
|
# Disabled now that I'm compiling Bullet in single-precision
|
|
# -DBT_USE_DOUBLE_PRECISION
|
|
-g ;
|
|
|
|
HDRS = src
|
|
# Dependencies/base2.0
|
|
# Dependencies/glm
|
|
# Dependencies/tracy
|
|
Dependencies/curl/include
|
|
Dependencies/rapidjson/include
|
|
Dependencies/mecab/build/local/include
|
|
Dependencies/parallel-hashmap/parallel_hashmap
|
|
;
|
|
|
|
# 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
|
|
##
|
|
|
|
if $(LIBNOTIFY_AVAILABLE)
|
|
{
|
|
# From pkg-config --libs libnotify
|
|
NOTIFY_LINKLIBS = -lnotify -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 ;
|
|
# From `pkg-config --cflags libnotify`
|
|
NOTIFY_HEADERS = /usr/include/gdk-pixbuf-2.0 /usr/include/libpng16
|
|
/usr/include/glib-2.0 /usr/lib/x86_64-linux-gnu/glib-2.0/include ;
|
|
|
|
NOTIFY_IMPLEMENTATION_FILES = src/Notifications_LibNotify.cpp ;
|
|
}
|
|
else
|
|
{
|
|
NOTIFY_LINKLIBS = ;
|
|
NOTIFY_HEADERS = ;
|
|
NOTIFY_IMPLEMENTATION_FILES = src/Notifications_Stub.cpp ;
|
|
}
|
|
|
|
LINKLIBS =
|
|
# Standard (e.g. for Tracy)
|
|
-lpthread -ldl
|
|
|
|
$(NOTIFY_LINKLIBS)
|
|
|
|
# curl
|
|
-LDependencies/curl/local_install/lib
|
|
-lcurl
|
|
|
|
-LDependencies/mecab/build/local/lib
|
|
-lmecab
|
|
|
|
# SFML
|
|
# -LDependencies/base2.0/dependencies/SFML/lib
|
|
# $(SFML_LINKLIBS)
|
|
|
|
# OpenGL
|
|
# -lGL
|
|
# -lGLU
|
|
# -lGLEW
|
|
|
|
# Base
|
|
# -LDependencies/base2.0 -lBase20
|
|
;
|
|
|
|
# LINKFLAGS = -Wl,-rpath,. ;
|
|
|
|
# TODO: Copy libs to better directory, or static link?
|
|
LINKFLAGS = -g
|
|
-Wl,-rpath,.:Dependencies/curl/local_install/lib:Dependencies/mecab/build/local/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 ;
|
|
|
|
# Cross compilation
|
|
# E.g.
|
|
# jam -j4 -q -sCROSS_COMPILE_WINDOWS=true
|
|
# if $(CROSS_COMPILE_WINDOWS)
|
|
# {
|
|
# CC = x86_64-w64-mingw32-gcc ;
|
|
# LINK = x86_64-w64-mingw32-gcc ;
|
|
# AR = x86_64-w64-mingw32-ar ;
|
|
# SUFSHR = .dll ;
|
|
# }
|
|
|
|
# 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 UNREAL=true,
|
|
# frustratingly
|
|
# -dx : print commands being used
|
|
# -n : don't actually run commands
|