patches/duma/2_5_15/100-cross-compile.patch
author Remy Bohmer <linux@bohmer.net>
Sun Jul 11 22:23:34 2010 +0200 (2010-07-11)
changeset 2021 3e52a1510f87
parent 572 944e145f3890
permissions -rw-r--r--
debug/gdb: Fix compilation for Mingw hosts

GDB requires PDcurses instead of ncurses while running on Windows.
So, do not always compile ncurses in case GDB needs to build.

PDcurses is provided by an earlier build step and is not described in
this file.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
[yann.morin.1998@anciense.nib.fr: we already have a way to detect ncurses usage]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@1436
     1
diff -durN duma_2_5_15.orig/GNUmakefile duma_2_5_15/GNUmakefile
yann@1436
     2
--- duma_2_5_15.orig/GNUmakefile	2008-08-03 21:22:38.000000000 +0200
yann@1436
     3
+++ duma_2_5_15/GNUmakefile	2009-06-19 15:32:23.000000000 +0200
yann@572
     4
@@ -93,10 +93,6 @@
yann@572
     5
 # also define 'WIN32'
yann@572
     6
 
yann@572
     7
 # some defaults:
yann@572
     8
-CC=gcc
yann@572
     9
-CXX=g++
yann@572
    10
-AR=ar
yann@572
    11
-RANLIB=ranlib
yann@572
    12
 INSTALL=install
yann@572
    13
 RM=rm
yann@572
    14
 RMFORCE=rm -f
yann@1436
    15
@@ -471,7 +467,7 @@
yann@572
    16
 
yann@572
    17
 createconf$(EXEPOSTFIX): createconf.o
yann@572
    18
 	- $(RMFORCE) createconf$(EXEPOSTFIX)
yann@572
    19
-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
yann@572
    20
+	$(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
yann@572
    21
 
yann@572
    22
 tstheap$(EXEPOSTFIX): libduma.a tstheap.o
yann@572
    23
 	- $(RMFORCE) tstheap$(EXEPOSTFIX)
yann@1436
    24
@@ -532,7 +528,7 @@
yann@572
    25
 # define rules how to build objects for createconf
yann@572
    26
 #
yann@572
    27
 createconf.o:
yann@572
    28
-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
yann@572
    29
+	$(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
yann@572
    30
 
yann@572
    31
 
yann@572
    32
 #