forked from github/server
112 lines
2.0 KiB
Plaintext
112 lines
2.0 KiB
Plaintext
C++ = g++ ;
|
|
CC = gcc ;
|
|
|
|
if ! $(DISTCC_HOSTS) {
|
|
} else {
|
|
CC = distcc $(CC) ;
|
|
C++ = distcc $(C++) ;
|
|
Echo Compiling with distcc ;
|
|
}
|
|
|
|
if ! $(CCACHE_DIR) {
|
|
} else {
|
|
CC = ccache $(CC) ;
|
|
C++ = ccache $(C++) ;
|
|
Echo Compiling with ccache ;
|
|
}
|
|
|
|
if $(PROFILE) = 1 {
|
|
Echo Compiling with profiler ;
|
|
CCFLAGS += -pg -g ;
|
|
LINKFLAGS += -pg -g ;
|
|
}
|
|
|
|
CCFLAGS += -Wall ;
|
|
|
|
CCFLAGS += -Wwrite-strings
|
|
-Wstrict-prototypes
|
|
-Werror-implicit-function-declaration
|
|
-Wno-char-subscripts
|
|
;
|
|
|
|
if $(HOST) = "hamunaptra" {
|
|
XMLHDRS = /homes2/info-f/enno/software/hamunaptra/include/libxml2 ;
|
|
C++FLAGS += -DHAVE_LUABIND_B7 ;
|
|
} else {
|
|
XMLHDRS = /usr/include/libxml2 ;
|
|
}
|
|
|
|
rule iconv
|
|
{
|
|
if $(LINK_ICONV) {
|
|
LINKLIBS on $(<) += -liconv ;
|
|
}
|
|
}
|
|
|
|
rule luabind
|
|
{
|
|
LINKLIBS on $(<) += -L$(LUABIND_ROOT)/lib ;
|
|
if $(HOST) = "hamunaptra" {
|
|
LINKLIBS on $(<) += -llua -llualib ;
|
|
} else {
|
|
LINKLIBS on $(<) += -llua50 -llualib50 ;
|
|
}
|
|
LINKLIBS on $(<) += -lm -lluabind ;
|
|
}
|
|
|
|
rule libxml2
|
|
{
|
|
LINKLIBS on $(<) += -lxml2 ;
|
|
}
|
|
|
|
rule UsingLuabind
|
|
{
|
|
SubDirHdrs $(LUABIND_ROOT)/include ;
|
|
}
|
|
|
|
rule UsingLua
|
|
{
|
|
SubDirHdrs $(LUA_ROOT)/include ;
|
|
}
|
|
|
|
rule TargetDirectory
|
|
{
|
|
# Now set up SEARCH_SOURCE, LOCATE_TARGET, SOURCE_GRIST
|
|
# These can be reset if needed. For example, if the source
|
|
# directory should not hold object files, LOCATE_TARGET can
|
|
# subsequently be redefined.
|
|
|
|
local path = [ FDirName $(SUBDIR) $(TARGET_PREFIX) ] ;
|
|
SEARCH_SOURCE = $(SUBDIR) ;
|
|
LOCATE_SOURCE = $(ALL_LOCATE_TARGET) $(path) ;
|
|
LOCATE_TARGET = $(ALL_LOCATE_TARGET) $(path) ;
|
|
SOURCE_GRIST = $(path) ;
|
|
if $(DEBUG) = 1 {
|
|
SubDirCcFlags -g ;
|
|
SubDirC++Flags -g ;
|
|
}
|
|
else {
|
|
SubDirCcFlags -DNDEBUG -O2 ;
|
|
SubDirC++Flags -DNDEBUG -O2 ;
|
|
}
|
|
}
|
|
|
|
if ! $(DEBUG) {
|
|
ECHO Assuming DEBUG=1 ;
|
|
DEBUG = 1 ;
|
|
}
|
|
|
|
if $(PROFILE) = 1 {
|
|
TARGET_PREFIX = Profile ;
|
|
}
|
|
else {
|
|
if $(DEBUG) = 0 {
|
|
TARGET_PREFIX = Release ;
|
|
}
|
|
else {
|
|
TARGET_PREFIX = Debug ;
|
|
}
|
|
}
|
|
|
|
|