CFLAGS_COMMON += -fPIC
LDFLAGS_DLL = -fPIC -ldl
LIBS_COMMON = -lpthread
- EXE = x86
+ EXE ?= x86
A = a
DLL = so
MWINDOWS =
CFLAGS_COMMON += -mms-bitfields
LDFLAGS_DLL = --dll -Wl,--add-stdcall-alias
LIBS_COMMON = -lws2_32 -luser32 -lgdi32
- EXE = exe
+ EXE ?= exe
A = a
DLL = dll
MWINDOWS = -mwindows
CPPFLAGS_COMMON += -I/sw/include -I/usr/X11R6/include
LDFLAGS_COMMON += -L/sw/lib -L/usr/lib -L/usr/X11R6/lib
LDFLAGS_DLL += -dynamiclib -ldl
- EXE = ppc
+ EXE ?= ppc
A = a
DLL = dylib
MWINDOWS =
RADIANT_MINOR_VERSION = 0
Q3MAP_VERSION = 2.5.17n
+# Executable extension
+RADIANT_EXECUTABLE := $(EXE)
+
SVN_VERSION := $(shell $(SVNVERSION) -n $(STDERR_TO_DEVNULL) | $(SED) 's/M$$//g; s/.*://g;')
ifneq ($(SVN_VERSION),)
RADIANT_VERSION := $(RADIANT_VERSION)-svn$(SVN_VERSION)
Q3MAP_VERSION := $(Q3MAP_VERSION)-svn$(SVN_VERSION)
endif
-CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\"" -DQ3MAP_VERSION="\"$(Q3MAP_VERSION)\""
+CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\"" -DQ3MAP_VERSION="\"$(Q3MAP_VERSION)\"" -DRADIANT_EXECUTABLE="\"$(RADIANT_EXECUTABLE)\""
.PHONY: all
all: \
return true;
}
-
-const char* const EXECUTABLE_TYPE =
-#if defined(__linux__) || defined (__FreeBSD__)
-"x86"
-#elif defined(__APPLE__)
-"ppc"
-#elif defined(WIN32)
-"exe"
-#else
-#error "unknown platform"
-#endif
-;
-
void bsp_init()
{
build_set_variable("RadiantPath", AppPath_get());
- build_set_variable("ExecutableType", EXECUTABLE_TYPE);
+ build_set_variable("ExecutableType", RADIANT_EXECUTABLE);
build_set_variable("EnginePath", EnginePath_get());
build_set_variable("MonitorAddress", (g_WatchBSP_Enabled) ? "127.0.0.1:39000" : "");
build_set_variable("GameName", gamename_get());