[iortcw] 282/497: All: Fix compiling lcc using mingw under cygwin (ioquake3 version)

Simon McVittie smcv at debian.org
Fri Sep 8 10:37:08 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 4b57254db22949b3089b2550e9a3172595766bde
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Tue Jan 27 23:58:52 2015 +0000

    All: Fix compiling lcc using mingw under cygwin (ioquake3 version)
---
 MP/Makefile                      | 14 ++++++++++----
 MP/code/tools/lcc/etc/bytecode.c |  7 +------
 SP/Makefile                      |  9 +++++----
 SP/code/tools/lcc/etc/bytecode.c |  7 +------
 4 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/MP/Makefile b/MP/Makefile
index 6844ca2..f5ad3f1 100644
--- a/MP/Makefile
+++ b/MP/Makefile
@@ -52,6 +52,10 @@ endif
 #############################################################################
 -include Makefile.local
 
+ifeq ($(COMPILE_PLATFORM),cygwin)
+  PLATFORM=mingw32
+endif
+
 ifndef PLATFORM
 PLATFORM=$(COMPILE_PLATFORM)
 endif
@@ -649,6 +653,7 @@ ifeq ($(PLATFORM),mingw32)
 
   ifeq ($(COMPILE_PLATFORM),cygwin)
     TOOLS_BINEXT=.exe
+    TOOLS_CC=$(CC)
   endif
 
   LIBS= -lws2_32 -lwinmm -lpsapi
@@ -1416,11 +1421,7 @@ makedirs:
 
 ifndef TOOLS_CC
   # A compiler which probably produces native binaries
-  ifeq ($(COMPILE_PLATFORM),cygwin)
-  TOOLS_CC = $(CC)
-  else
   TOOLS_CC = gcc
-  endif
 endif
 
 TOOLS_OPTIMIZE = -g -Wall -fno-strict-aliasing
@@ -2084,6 +2085,11 @@ Q3OBJ += \
   $(B)/client/zutil.o
 endif
 
+ifeq ($(USE_ANTIWALLHACK),1)
+  Q3OBJ += \
+      $(B)/client/sv_wallhack.o
+endif
+
 ifeq ($(HAVE_VM_COMPILED),true)
   ifneq ($(findstring $(ARCH),x86 x86_64),)
     Q3OBJ += \
diff --git a/MP/code/tools/lcc/etc/bytecode.c b/MP/code/tools/lcc/etc/bytecode.c
index 053b754..a5855de 100644
--- a/MP/code/tools/lcc/etc/bytecode.c
+++ b/MP/code/tools/lcc/etc/bytecode.c
@@ -4,7 +4,7 @@
 #include <stdio.h>
 #include "../../../qcommon/q_platform.h"
 
-#if defined _WIN32 || defined __CYGWIN__
+#ifdef _WIN32
 #define BINEXT ".exe"
 #else
 #define BINEXT ""
@@ -36,12 +36,7 @@ void UpdatePaths( const char *lccBinary )
 	char *p;
 
 	strncpy( basepath, lccBinary, 1024 );
-
-#if defined( __CYGWIN__ )
-	p = strrchr( basepath, '/' );
-#else
 	p = strrchr( basepath, PATH_SEP );
-#endif
 
 	if( p )
 	{
diff --git a/SP/Makefile b/SP/Makefile
index a226b27..d0c2bd8 100644
--- a/SP/Makefile
+++ b/SP/Makefile
@@ -52,6 +52,10 @@ endif
 #############################################################################
 -include Makefile.local
 
+ifeq ($(COMPILE_PLATFORM),cygwin)
+  PLATFORM=mingw32
+endif
+
 ifndef PLATFORM
 PLATFORM=$(COMPILE_PLATFORM)
 endif
@@ -645,6 +649,7 @@ ifeq ($(PLATFORM),mingw32)
 
   ifeq ($(COMPILE_PLATFORM),cygwin)
     TOOLS_BINEXT=.exe
+    TOOLS_CC=$(CC)
   endif
 
   LIBS= -lws2_32 -lwinmm -lpsapi
@@ -1408,11 +1413,7 @@ makedirs:
 
 ifndef TOOLS_CC
   # A compiler which probably produces native binaries
-  ifeq ($(COMPILE_PLATFORM),cygwin)
-  TOOLS_CC = $(CC)
-  else
   TOOLS_CC = gcc
-  endif
 endif
 
 TOOLS_OPTIMIZE = -g -Wall -fno-strict-aliasing
diff --git a/SP/code/tools/lcc/etc/bytecode.c b/SP/code/tools/lcc/etc/bytecode.c
index 053b754..a5855de 100644
--- a/SP/code/tools/lcc/etc/bytecode.c
+++ b/SP/code/tools/lcc/etc/bytecode.c
@@ -4,7 +4,7 @@
 #include <stdio.h>
 #include "../../../qcommon/q_platform.h"
 
-#if defined _WIN32 || defined __CYGWIN__
+#ifdef _WIN32
 #define BINEXT ".exe"
 #else
 #define BINEXT ""
@@ -36,12 +36,7 @@ void UpdatePaths( const char *lccBinary )
 	char *p;
 
 	strncpy( basepath, lccBinary, 1024 );
-
-#if defined( __CYGWIN__ )
-	p = strrchr( basepath, '/' );
-#else
 	p = strrchr( basepath, PATH_SEP );
-#endif
 
 	if( p )
 	{

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list