2004-01-23 01:11:54 +01:00
|
|
|
C++ = g++ ;
|
|
|
|
CC = gcc ;
|
|
|
|
|
2003-04-27 19:03:12 +02:00
|
|
|
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 ;
|
|
|
|
}
|
|
|
|
|
2004-01-12 17:22:14 +01:00
|
|
|
if $(PROFILE) = 1 {
|
|
|
|
Echo Compiling with profiler ;
|
2004-05-26 08:24:22 +02:00
|
|
|
CCFLAGS += -pg -g ;
|
|
|
|
LINKFLAGS += -pg -g ;
|
2004-01-12 17:22:14 +01:00
|
|
|
}
|
|
|
|
|
2003-04-27 19:03:12 +02:00
|
|
|
CCFLAGS += -Wall ;
|
|
|
|
|
|
|
|
CCFLAGS += -Wwrite-strings
|
|
|
|
-Wstrict-prototypes
|
|
|
|
-Werror-implicit-function-declaration
|
2004-04-08 12:14:23 +02:00
|
|
|
-Wno-char-subscripts
|
2003-04-27 19:03:12 +02:00
|
|
|
;
|
|
|
|
|
2004-09-05 16:08:10 +02:00
|
|
|
if $(HOST) = "hamunaptra" {
|
|
|
|
XMLHDRS = /homes2/info-f/enno/software/hamunaptra/include/libxml2 ;
|
2004-09-11 22:25:49 +02:00
|
|
|
C++FLAGS += -DHAVE_LUABIND_B7 ;
|
2004-09-05 16:08:10 +02:00
|
|
|
} else {
|
|
|
|
XMLHDRS = /usr/include/libxml2 ;
|
|
|
|
}
|
2004-04-18 14:30:31 +02:00
|
|
|
|
2004-04-08 12:14:23 +02:00
|
|
|
rule iconv
|
|
|
|
{
|
2004-04-08 12:29:58 +02:00
|
|
|
if $(LINK_ICONV) {
|
|
|
|
LINKLIBS on $(<) += -liconv ;
|
|
|
|
}
|
2004-04-08 12:14:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
rule luabind
|
|
|
|
{
|
2004-09-05 16:08:10 +02:00
|
|
|
LINKLIBS on $(<) += -L$(LUABIND_ROOT)/lib ;
|
|
|
|
if $(HOST) = "hamunaptra" {
|
|
|
|
LINKLIBS on $(<) += -llua -llualib ;
|
|
|
|
} else {
|
|
|
|
LINKLIBS on $(<) += -llua50 -llualib50 ;
|
|
|
|
}
|
2004-04-08 12:14:23 +02:00
|
|
|
LINKLIBS on $(<) += -lm -lluabind ;
|
|
|
|
}
|
|
|
|
|
|
|
|
rule libxml2
|
|
|
|
{
|
|
|
|
LINKLIBS on $(<) += -lxml2 ;
|
|
|
|
}
|
|
|
|
|
2003-12-14 13:27:09 +01:00
|
|
|
rule UsingLuabind
|
|
|
|
{
|
|
|
|
SubDirHdrs $(LUABIND_ROOT)/include ;
|
|
|
|
}
|
|
|
|
|
|
|
|
rule UsingLua
|
|
|
|
{
|
|
|
|
SubDirHdrs $(LUA_ROOT)/include ;
|
|
|
|
}
|
|
|
|
|
2003-04-27 19:03:12 +02:00
|
|
|
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 {
|
2004-05-25 19:54:47 +02:00
|
|
|
SubDirCcFlags -DNDEBUG -O2 ;
|
|
|
|
SubDirC++Flags -DNDEBUG -O2 ;
|
2003-04-27 19:03:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ! $(DEBUG) {
|
|
|
|
ECHO Assuming DEBUG=1 ;
|
|
|
|
DEBUG = 1 ;
|
|
|
|
}
|
|
|
|
|
2004-03-29 08:06:55 +02:00
|
|
|
if $(PROFILE) = 1 {
|
|
|
|
TARGET_PREFIX = Profile ;
|
2003-04-27 19:03:12 +02:00
|
|
|
}
|
|
|
|
else {
|
2004-03-29 08:06:55 +02:00
|
|
|
if $(DEBUG) = 0 {
|
|
|
|
TARGET_PREFIX = Release ;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
TARGET_PREFIX = Debug ;
|
|
|
|
}
|
2003-04-27 19:03:12 +02:00
|
|
|
}
|
|
|
|
|
2004-03-29 08:06:55 +02:00
|
|
|
|