]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
allow specifying executable type
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sat, 25 Jul 2009 10:23:32 +0000 (10:23 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sat, 25 Jul 2009 10:23:32 +0000 (10:23 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@391 61c419a2-8eb2-4b30-bcec-8cead039b335

Makefile
radiant/qe3.cpp

index 3f702073011a3454fb5ca7d62f4262d9150ce66e..352412bb27ee4a8d0a1fb440200bd120a5e0a732 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,7 @@ ifeq ($(OS),Linux)
        CFLAGS_COMMON += -fPIC
        LDFLAGS_DLL = -fPIC -ldl
        LIBS_COMMON = -lpthread
-       EXE = x86
+       EXE ?= x86
        A = a
        DLL = so
        MWINDOWS =
@@ -166,7 +166,7 @@ ifeq ($(OS),Win32)
        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
@@ -186,7 +186,7 @@ ifeq ($(OS),Darwin)
        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 =
@@ -215,13 +215,16 @@ RADIANT_MAJOR_VERSION = 5
 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: \
index a526c608d003cc1e63ed23100d94ec3d08a30aeb..451489b531c83b765d21e661c3bf4f54244fec00 100644 (file)
@@ -170,23 +170,10 @@ bool ConfirmModified(const char* title)
   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());