crosstool-ng/patches/duma/2_5_1/100-cross-compile.patch
2007-07-12 08:47:15 +00:00

111 lines
3.1 KiB
Diff

diff -dur duma_2_5_1/Makefile duma_2_5_1.orig/Makefile
--- duma_2_5_1/Makefile 2006-06-18 06:02:13.000000000 +0200
+++ duma_2_5_1.orig/Makefile 2007-07-11 17:49:43.000000000 +0200
@@ -98,10 +98,6 @@
LIBS=-lpthread
endif
-
-CC=gcc
-CXX=g++
-AR=ar
INSTALL=install
############################################################
@@ -169,31 +165,31 @@
createconf: createconf.o
- rm -f createconf
- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
+ $(HOSTCC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
tstheap: libduma.a tstheap.o
- rm -f tstheap
- $(CC) $(CFLAGS) tstheap.o libduma.a -o tstheap $(LIBS)
+ $(HOSTCC) $(CFLAGS) tstheap.o libduma.a -o tstheap $(LIBS)
dumatest: libduma.a dumatest.o
- rm -f dumatest
- $(CC) $(CFLAGS) dumatest.o libduma.a -o dumatest $(LIBS)
+ $(HOSTCC) $(CFLAGS) dumatest.o libduma.a -o dumatest $(LIBS)
dumatestpp: libduma.a dumatestpp.o dumapp.h
- rm -f dumatestpp
- $(CXX) $(CPPFLAGS) dumatestpp.o libduma.a -o dumatestpp $(LIBS)
+ $(HOSTCXX) $(CPPFLAGS) dumatestpp.o libduma.a -o dumatestpp $(LIBS)
testoperators: libduma.a testoperators.o dumapp.h
- rm -f testoperators
- $(CXX) $(CPPFLAGS) testoperators.o libduma.a -o testoperators $(LIBS)
+ $(HOSTCXX) $(CPPFLAGS) testoperators.o libduma.a -o testoperators $(LIBS)
tstheap_so: tstheap_so.o
- rm -f tstheap_so
- $(CC) $(CFLAGS) tstheap_so.o -o tstheap_so $(LIBS)
+ $(HOSTCC) $(CFLAGS) tstheap_so.o -o tstheap_so $(LIBS)
dumatestpp_so: dumatestpp_so.o
- rm -f dumatestpp_so
- $(CXX) $(CPPFLAGS) dumatestpp_so.o -o dumatestpp_so $(LIBS)
+ $(HOSTCXX) $(CPPFLAGS) dumatestpp_so.o -o dumatestpp_so $(LIBS)
$(OBJECTS) tstheap.o dumatest.o dumatestpp.o: duma.h
@@ -211,7 +207,7 @@
# define rules how to build objects for createconf
#
createconf.o:
- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
+ $(HOSTCC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
#
@@ -230,13 +226,6 @@
print_so.o: print.c print.h
$(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c print.c -o $@
-# DUMA_SO_OPTIONS needed cause duma.h is included explicitly
-tstheap_so.o:
- $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c tstheap.c -o $@
-
-dumatestpp_so.o:
- $(CXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumatestpp.cpp -o $@
-
#
# define rules how to build objects for static library
#
@@ -259,17 +248,23 @@
#
dumatest.o: dumatest.c duma.h duma_config.h
- $(CC) $(CFLAGS) -c dumatest.c -o $@
+ $(HOSTCC) $(CFLAGS) -c dumatest.c -o $@
dumatestpp.o: dumatestpp.cpp duma.h dumapp.h duma_config.h
- $(CXX) $(CPPFLAGS) -c dumatestpp.cpp -o $@
+ $(HOSTCXX) $(CPPFLAGS) -c dumatestpp.cpp -o $@
tstheap.o: tstheap.c duma.h duma_config.h
- $(CC) $(CFLAGS) -c tstheap.c -o $@
+ $(HOSTCC) $(CFLAGS) -c tstheap.c -o $@
testoperators.o: testoperators.cpp duma.h dumapp.h duma_config.h
- $(CXX) $(CPPFLAGS) -c testoperators.cpp -o $@
+ $(HOSTCXX) $(CPPFLAGS) -c testoperators.cpp -o $@
+
+# DUMA_SO_OPTIONS needed cause duma.h is included explicitly
+tstheap_so.o:
+ $(HOSTCC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c tstheap.c -o $@
+dumatestpp_so.o:
+ $(HOSTCXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumatestpp.cpp -o $@
#
# default rules
@@ -280,5 +275,3 @@
#.cpp.o:
# $(CXX) $(CPPFLAGS) -c $< -o $@
#
-
-