therion (5.3.3-1) 20debianize-makefiles.patch

Summary

 Makefile |  114 ++++++++-------------------------------------------------------
 1 file changed, 15 insertions(+), 99 deletions(-)

    
download this patch

Patch contents

Index: therion-5.3.3/Makefile
===================================================================
--- therion-5.3.3.orig/Makefile	2010-06-01 13:41:39.000000000 +0100
+++ therion-5.3.3/Makefile	2010-06-06 23:47:49.000000000 +0100
@@ -20,18 +20,20 @@
   thtrans.o thwarpp.o thwarppt.o thwarppme.o thwarp.o thexpshp.o thattr.o thtex.o \
   therion.o extern/proj4/libproj.a 
 
-# PLATFORM CONFIG
-
-# PLATFORM LINUX
-##CXX = g++
-##CC = gcc
-##POBJECTS =
-##LOCHEXE = loch/loch
-##CXXPFLAGS = -DTHLINUX
-##CCPFLAGS = -DTHLINUX
-##LDPFLAGS = -s
-##THPLATFORM = LINUX
-##THXTHMKCMD = ./therion
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+  CCBFLAGS = -ggdb
+  CXXBFLAGS = -ggdb -DTHDEBUG
+else
+  ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+    CCBFLAGS = -O2
+    CXXBFLAGS = -O2
+  endif
+endif
+
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+  INSTALL_PROGRAM += -s
+  LDFLAGS += -s
+endif
 
 
 # PLATFORM DEBIAN
@@ -41,61 +43,12 @@
 LOCHEXE = loch/loch
 CXXPFLAGS = -DTHLINUX
 CCPFLAGS = -DTHLINUX
-LDPFLAGS = -s
 THPLATFORM = LINUX
 THXTHMKCMD = ./therion
 
-
-# PLATFORM WIN32
-##CXX = c++
-##CC = gcc
-##POBJECTS = extern/getopt.o extern/getopt1.o therion.res extern/getline.o 
-##LOCHEXE = loch/loch
-##CXXPFLAGS = -DTHWIN32
-##CCPFLAGS = -DTHWIN32
-##LDPFLAGS = -static-libgcc -static -s
-##THPLATFORM = WIN32
-##THXTHMKCMD = therion
-
-# PLATFORM MACOSX
-##CXX = c++
-##CC = cc
-##LOCHEXE =
-##POBJECTS = extern/getopt.o extern/getopt1.o extern/getline.o
-##CXXPFLAGS = -DTHMACOSX
-##CCPFLAGS = -DTHMACOSX
-##LDPFLAGS =
-##THPLATFORM = MACOSX
-##THXTHMKCMD = ./therion
-
 # PLATFORM ENDCONFIG
 
 
-# BUILD CONFIG
-
-# BUILD OZONE
-##CCBFLAGS = -O3
-##CXXBFLAGS = -O3
-##LDBFLAGS = $(LDPFLAGS)
-
-# BUILD OXYGEN
-CCBFLAGS = -O2
-CXXBFLAGS = -O2
-LDBFLAGS = $(LDPFLAGS)
-
-# BUILD RELEASE
-##CCBFLAGS = 
-##CXXBFLAGS = 
-##LDBFLAGS = $(LDPFLAGS)
-
-# BUILD DEBUG
-##CCBFLAGS = -ggdb
-##CXXBFLAGS = -ggdb -DTHDEBUG
-##LDBFLAGS = 
-
-# BUILD ENDCONFIG
-
-
 # compiler settings
 CXXFLAGS = -Wall $(CXXPFLAGS) $(CXXBFLAGS)
 CCFLAGS = -Wall $(CCPFLAGS) $(CCBFLAGS)
@@ -104,8 +57,6 @@
 
 # linker settings
 LIBS = 
-LDFLAGS = $(LDBFLAGS)
-
 
 .SUFFIXES:
 .SUFFIXES: .cxx .o .h .c
@@ -124,10 +75,6 @@
 therion:	$(OBJECTS)
 	$(CXX) -Wall -o therion $(OBJECTS) $(LDFLAGS) $(LIBS) 
 
-
-therion.res: therion.rc
-	windres -i therion.rc -J rc -o therion.res -O coff
-
 init:
 	./therion --print-init-file > therion.ini
 
@@ -173,7 +120,7 @@
 
 thbook: thbook/thbook.pdf
 
-samples: samples.doc/index.tex
+samples: samples.doc/index.tex therion
 
 samples.doc/index.tex:
 	make -C ./samples
@@ -220,37 +167,6 @@
 thlangdata.cxx: thlang/texts.txt
 	make -C ./thlang
 
-config-debug:
-	perl makeconfig.pl BUILD DEBUG
-	make -C ./loch config-debug
-  
-config-release:
-	perl makeconfig.pl BUILD RELEASE
-	make -C ./loch config-release
-
-config-oxygen:
-	perl makeconfig.pl BUILD OXYGEN
-	make -C ./loch config-oxygen
-  
-config-ozone:
-	perl makeconfig.pl BUILD OZONE
-	make -C ./loch config-ozone
-
-config-debian:
-	perl makeconfig.pl PLATFORM DEBIAN
-	make -C ./loch config-debian
-  
-config-linux:
-	perl makeconfig.pl PLATFORM LINUX
-	make -C ./loch config-linux
-  
-config-win32:
-	perl makeconfig.pl PLATFORM WIN32
-	make -C ./loch config-win32
-  
-config-macosx:
-	perl makeconfig.pl PLATFORM MACOSX
-	make -C ./loch config-macosx
 
 # external sources
 extern/getopt.o: extern/getopt.c extern/getopt.h