crafty (23.3-1~squeeze1) 01-Makefile.dpatch

Summary

 Makefile |   31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

#! /bin/sh /usr/share/dpatch/dpatch-run
## 01-Makefile.dpatch by Oliver Korff <ok@xynyx.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: This patch adds a linux-generic target to be used in other architectures. 
## DP: The linux target was patched to include the -DINLINE32 switch
## DP: Some variables used in the binary were preset, for detailes see line 17ff
## DP: Disabled profiling -pg switch for the linux target

@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' crafty-23.2~/Makefile crafty-23.2/Makefile
--- crafty-23.2~/Makefile	2010-03-06 21:31:10.000000000 +0100
+++ crafty-23.2/Makefile	2010-03-06 21:32:48.000000000 +0100
@@ -35,6 +35,22 @@
 #   -DTRACE        N  This enables the "trace" command so that the search tree
 #                     can be dumped while running.
 
+#Edited for Debian GNU/Linux
+DESTDIR =
+BIN = $(DESTDIR)/usr/games
+BOOKS = $(DESTDIR)/var/lib/crafty
+DOC = $(DESTDIR)/usr/share/doc
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+       INSTALL += -s
+endif
+
+# Next option allows to build the package with debugging information.
+# DEB_BUILD_OPTIONS=debug     # This allows the generation of a build tree with
+# debugging information.
+
 default:
 	$(MAKE) linux-64
 help:
@@ -126,12 +142,21 @@
 linux:
 	$(MAKE) target=LINUX \
 		CC=gcc CXX=g++ \
-		CFLAGS='-pg -Wall -pipe' \
+		CFLAGS='-Wall -pipe' \
 		CXFLAGS='' \
-		LDFLAGS='$(LDFLAGS) -pg -lstdc++ -lpthread' \
-		opt='$(opt) -DTRACE -DINLINE64 -DCPUS=2' \
+		LDFLAGS='$(LDFLAGS) -lstdc++ -lpthread' \
+		opt='$(opt) -DTRACE -DINLINE32 -DCPUS=2' \
 		crafty-make
 
+linux-generic:
+	$(MAKE) target=LINUX \
+               CC=gcc CXX=g++ \
+               CFLAGS='$(CFLAGS) -Wall -pipe -O3 -fno-gcse' \
+               CXFLAGS='$(CFLAGS)' \
+               LDFLAGS='$(LDFLAGS) -lpthread -lstdc++' \
+               opt='$(opt) -DCPUS=2' \
+               crafty-make
+
 linux-profile:
 	$(MAKE) target=LINUX \
 		CC=gcc CXX=g++ \