From 00e39e3ffe3e62da67da7cb1be95b150391e2c0c Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 18 Jan 2017 22:20:58 +0000 Subject: [PATCH] Support compiling with a custom application name with make APPNAME="something". DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@6008 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile.common | 3 +++ polymer/eduke32/source/duke3d.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 8c0f44f37..405ee5d81 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -170,6 +170,7 @@ APPLE_FRAMEWORKS ?=/Library/Frameworks # NOASM - disables the use of inline assembly pragmas # LINKED_GTK - enables compile-time linkage to GTK # +APPNAME ?= EDuke32 POLYMER = 1 USE_OPENGL = 1 NOASM = 0 @@ -670,6 +671,8 @@ ifneq (0,$(DMALLOC)) COMPILERFLAGS+= -DDMALLOC endif +COMPILERFLAGS+= -DAPPNAME=\"$(APPNAME)\" + # may be overridden EXESUFFIX= DLLSUFFIX=.so diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index fd3d50a73..f47296927 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -43,7 +43,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "keyboard.h" #include "fx_man.h" -#define APPNAME "EDuke32" +#ifndef APPNAME + #define APPNAME "EDuke32" +#endif + #define HEAD2 APPNAME #define VOLUMEALL (g_Shareware == 0)