The following commit has been merged in the master branch:
commit c5ccf66fd72ae69469df2c57819bba0b94fff159
Author: Antonio Valentino <antonio.valent...@tiscali.it>
Date:   Mon Feb 14 20:03:44 2011 +0100

    Fixed new binary programs building

diff --git a/debian/Makefile b/debian/Makefile
index e39c2e7..80bac32 100644
--- a/debian/Makefile
+++ b/debian/Makefile
@@ -1,6 +1,7 @@
 # Makefile
 
 CFLAGS = -Wall -O2
+CXXFLAGS = $(CFLAGS) -Wconversion
 LDFLAGS = -lm
 
 LIB_FILES = \
@@ -17,16 +18,6 @@ C_FILES = $(wildcard basis_change/*.c) $(wildcard 
bmp_process/*.c) \
           $(wildcard data_process_mult/*.c) $(wildcard data_process_sngl/*.c) \
           $(wildcard speckle_filter/*.c) $(wildcard tools/*.c)
 
-# @TODO: check
-# Soft/data_process_sngl/scattering_mechanism_entropy_C3.exe
-# Soft/data_process_sngl/scattering_mechanism_entropy_C4.exe
-# Soft/data_process_sngl/scattering_mechanism_entropy_S2.exe
-# Soft/data_process_sngl/scattering_mechanism_entropy_T3.exe
-# Soft/data_process_sngl/tsvm_decomposition_C3.exe
-# Soft/data_process_sngl/tsvm_decomposition_C4.exe
-# Soft/data_process_sngl/tsvm_decomposition_S2.exe
-# Soft/data_process_sngl/tsvm_decomposition_T3.exe
-
 COMMONSIMSRC = \
        PolSARproSim.c \
        Allometrics.c \
@@ -85,53 +76,79 @@ SIMGRBIN = \
        PolSARproSIMgr/PolSARproSimGR_ImgSize.exe \
        PolSARproSIMgr/PolSARproSim_FE_Kz.exe
 
+SVMBIN = \
+       SVM/svm_classifier.exe \
+       SVM/svm_confusion_matrix.exe \
+       SVM/svm_predict_polsarpro.exe \
+       SVM/svm_scale_polsarpro.exe \
+       SVM/svm_train_polsarpro.exe \
+       SVM/grid_polsarpro.exe \
+       SVM/write_best_cv_results.exe
+
 
 .PHONY: all clean
 
-all: $(BIN) $(SIMBIN) $(SIMGRBIN) $(SIMSVBIN)
+all: $(BIN) $(SIMBIN) $(SIMGRBIN) $(SIMSVBIN) $(SVMBIN)
 
 clean:
-       $(RM) $(BIN) $(SIMBIN) $(SIMGRBIN) $(SIMSVBIN) $(LIBOBJ)
+       $(RM) $(BIN) $(SIMBIN) $(SIMGRBIN) $(SIMSVBIN) $(LIBOBJ) $(SVMBIN) 
SVM/svm.o
 
 
 # PolSARproSIM
 SIMSRC = $(foreach SRC,$(COMMONSIMSRC),PolSARproSIM/$(SRC))
 PolSARproSIM/PolSARproSim.exe: $(SIMSRC)
-       $(CC) $(CFLAGS) -o $@ -I PolSARproSIM $(SIMSRC) $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -I PolSARproSIM $(SIMSRC) $(LDFLAGS)
 
 PolSARproSIM/PolSARproSim_ImgSize.exe: PolSARproSIM/PolSARproSim_ImgSize.c
-       $(CC) $(CFLAGS) -o $@ $< -I PolSARproSIM $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -I PolSARproSIM $(LDFLAGS)
 
 SIMFESRC = PolSARproSIM/PolSARproSim_FE_Kz.c lib/matrix.c lib/util.c
 PolSARproSIM/PolSARproSim_FE_Kz.exe: $(SIMFESRC)
-       $(CC) $(CFLAGS) -o $@ -I PolSARproSIM $(SIMFESRC) $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -I PolSARproSIM $(SIMFESRC) $(LDFLAGS)
 
 
 # PolSARproSIMgr
 SIMGRSRC = $(foreach SRC,$(COMMONSIMSRC),PolSARproSIMgr/$(SRC))
 PolSARproSIMgr/PolSARproSim_gr.exe: $(SIMGRSRC)
-       $(CC) $(CFLAGS) -o $@ -I PolSARproSIMgr $(SIMGRSRC) $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -I PolSARproSIMgr $(SIMGRSRC) 
$(LDFLAGS)
 
 PolSARproSIMgr/PolSARproSimGR_ImgSize.exe: 
PolSARproSIMgr/PolSARproSimGR_ImgSize.c
-       $(CC) $(CFLAGS) -o $@ $< -I PolSARproSIMgr $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -I PolSARproSIMgr $(LDFLAGS)
 
 SIMGRFESRC = PolSARproSIMgr/PolSARproSim_FE_Kz.c lib/matrix.c lib/util.c
 PolSARproSIMgr/PolSARproSim_FE_Kz.exe: $(SIMGRFESRC)
-       $(CC) $(CFLAGS) -o $@ -I PolSARproSIMgr $(SIMGRFESRC) $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -I PolSARproSIMgr $(SIMGRFESRC) 
$(LDFLAGS)
 
 
 # PolSARproSIMsv
 SIMSVSRC = $(foreach SRC,$(COMMONSIMSRC),PolSARproSIMsv/$(SRC))
 PolSARproSIMsv/PolSARproSim_sv.exe: $(SIMSVSRC)
-       $(CC) $(CFLAGS) -o $@ -I PolSARproSIMsv $(SIMSVSRC) $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -I PolSARproSIMsv $(SIMSVSRC) 
$(LDFLAGS)
 
 PolSARproSIMsv/PolSARproSimSV_ImgSize.exe: 
PolSARproSIMsv/PolSARproSimSV_ImgSize.c
-       $(CC) $(CFLAGS) -o $@ $< -I PolSARproSIMsv $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -I PolSARproSIMsv $(LDFLAGS)
 
 SIMSVFESRC = PolSARproSIMsv/PolSARproSim_FE_Kz.c lib/matrix.c lib/util.c
 PolSARproSIMsv/PolSARproSim_FE_Kz.exe: $(SIMSVFESRC)
-       $(CC) $(CFLAGS) -o $@ -I PolSARproSIMsv $(SIMSVFESRC) $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -I PolSARproSIMsv $(SIMSVFESRC) 
$(LDFLAGS)
+
+
+# @TODO: check CXX
+SVM/svm.o: SVM/svm.cpp
+       $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
+
+SVM/svm_predict_polsarpro.exe: SVM/svm-predict.c SVM/svm.o $(LIBOBJ)
+       $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< SVM/svm.o $(LIBOBJ) $(LDFLAGS)
+
+SVM/svm_train_polsarpro.exe: SVM/svm-train.c SVM/svm.o $(LIBOBJ)
+       $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< SVM/svm.o $(LIBOBJ) $(LDFLAGS)
+
+SVM/svm_scale_polsarpro.exe: SVM/svm-scale.c SVM/svm.o $(LIBOBJ)
+       $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< SVM/svm.o $(LIBOBJ) $(LDFLAGS)
 
 
 %.exe: %.c $(LIBOBJ)
-       $(CC) $(CFLAGS) -o $@ $< $(LIBOBJ) $(LDFLAGS)
+       $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LIBOBJ) $(LDFLAGS)
+
+# @TODO: check
+# Soft/bmp_process/extract_bmp_colormap_data.exe
diff --git a/debian/changelog b/debian/changelog
index bfbc0fb..120110d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,4 +2,4 @@ polsarpro (4.2.0+dfsg-1) unstable; urgency=low
 
   * Initial release (Closes: #606876)
 
- -- Antonio Valentino <antonio.valent...@tiscali.it>  Mon, 14 Feb 2011 
19:46:01 +0100
+ -- Antonio Valentino <antonio.valent...@tiscali.it>  Mon, 14 Feb 2011 
19:56:12 +0100
diff --git a/debian/patches/fix-build.patch b/debian/patches/fix-build.patch
new file mode 100644
index 0000000..8ba823f
--- /dev/null
+++ b/debian/patches/fix-build.patch
@@ -0,0 +1,42 @@
+Fix some header inclusion
+--- a/Soft/tools/load_config.c
++++ b/Soft/tools/load_config.c
+@@ -34,7 +34,7 @@
+ 
+ 
*******************************************************************************/
+ /* C INCLUDES */
+-#include <io.h>
++/*#include <io.h> */
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+--- a/Soft/SVM/svm-predict.c
++++ b/Soft/SVM/svm-predict.c
+@@ -12,10 +12,12 @@
+ #include <unistd.h>
+ 
+ //POLSARPRO
++extern "C" {
+ #include "../lib/graphics.h"
+ #include "../lib/matrix.h"
+ #include "../lib/processing.h"
+ #include "../lib/util.h"
++}
+ 
+ const long memory = (long)250000000;
+ struct svm_node *x;
+--- a/Soft/SVM/svm-scale.c
++++ b/Soft/SVM/svm-scale.c
+@@ -10,10 +10,12 @@
+ #include <string.h>
+ 
+ //POLSARPRO
++extern "C" {
+ #include "../lib/graphics.h"
+ #include "../lib/matrix.h"
+ #include "../lib/processing.h"
+ #include "../lib/util.h"
++}
+ 
+ void exit_with_help()
+ {
diff --git a/debian/patches/series b/debian/patches/series
index eb77252..80ff765 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 default-config.patch
+fix-build.patch
\ No newline at end of file
diff --git a/debian/rules b/debian/rules
index c89ef7a..9eec86a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,7 +49,8 @@ install/polsarpro-bin::
        cp -R --no-preserve=mode $(CURDIR)/Soft/* 
$(DEB_DESTDIR)/usr/lib/polsarpro
        find $(DEB_DESTDIR)/usr/lib/polsarpro -name '*.exe' -exec chmod 0755 
'{}' \;
 
-       find $(DEB_DESTDIR)/usr/lib/polsarpro -name '*.[hc]' -delete
+       find $(DEB_DESTDIR)/usr/lib/polsarpro -name '*.[hco]' -delete
+       find $(DEB_DESTDIR)/usr/lib/polsarpro -name '*.cpp' -delete
        rm -rf $(DEB_DESTDIR)/usr/lib/polsarpro/lib
        rm -rf $(DEB_DESTDIR)/usr/lib/polsarpro/tools/MyRoutines
        rm -f $(DEB_DESTDIR)/usr/lib/polsarpro/Compil_*.bat

-- 
Polarimetric SAR Data Processing and Educational Tool

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

Reply via email to