[libocas] 36/60: Use CPPFLAGS in Makefile (for hardening)
Christian Kastner
chrisk-guest at moszumanska.debian.org
Mon Aug 25 03:34:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
chrisk-guest pushed a commit to branch master
in repository libocas.
commit d907b3b4789be49c992d4ff8fa9e274490110066
Author: Christian Kastner <debian at kvr.at>
Date: Sat Jun 30 16:00:05 2012 +0200
Use CPPFLAGS in Makefile (for hardening)
---
...uild-shared-and-static-libraries-programs.patch | 25 +++++++++++-----------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch b/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
index 23c18ad..41f0709 100644
--- a/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
+++ b/debian/patches/0001-Properly-build-shared-and-static-libraries-programs.patch
@@ -6,16 +6,16 @@ Modify upstream's Makefile to properly build shared and static libraries, and
link upstream's programs to the shared libraries.
Forwarded: no
-Last-Update: 2010-06-17
+Last-Update: 2012-06-30
---
Makefile | 48 +++++++++++++++++++++++++++++++++++-------------
1 files changed, 35 insertions(+), 13 deletions(-)
-diff --git a/Makefile b/Makefile
-index 2ed4145..7ddb88e 100644
---- a/Makefile
-+++ b/Makefile
-@@ -3,10 +3,23 @@ MEX := mex
+Index: libocas-0.93/Makefile
+===================================================================
+--- libocas-0.93.orig/Makefile 2010-06-11 23:06:27.000000000 +0200
++++ libocas-0.93/Makefile 2012-06-30 15:59:10.191870897 +0200
+@@ -3,10 +3,23 @@
MEXFLAGS := $(shell if uname -m | grep -q x86_64 ; then echo -largeArrayDims ; fi)
MEXSUFFIX := $(shell if uname -m | grep -q x86_64 ; then echo mexa64 ; else echo mexglx ; fi)
CC := gcc
@@ -24,7 +24,7 @@ index 2ed4145..7ddb88e 100644
-#CFLAGS := -lm -msse -O3 -fPIC -fstrict-aliasing -fomit-frame-pointer -Wall
-#CFLAGS := -lm -msse -O3 -fPIC -fopenmp -fstrict-aliasing -fomit-frame-pointer -Wall
+
-+CFLAGS +=
++CFLAGS += $(CPPFLAGS)
+LDFLAGS +=
+LIBS += -lm
+
@@ -43,7 +43,7 @@ index 2ed4145..7ddb88e 100644
ifeq (yes,$(MEXDETECTED))
-@@ -43,21 +56,30 @@ lbpfilter.$(MEXSUFFIX): lbpfilter_mex.c
+@@ -43,21 +56,30 @@
else
@@ -64,17 +64,17 @@ index 2ed4145..7ddb88e 100644
linclass: linclass.c lib_svmlight_format.c libocas.h
- $(CC) $(CFLAGS) -o $@ linclass.c lib_svmlight_format.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ linclass.c lib_svmlight_format.c $(LIBS)
-+
+
+-libocas.so: libocas.c libocas.h libqp_splx.c libqp.h
+- $(CC) $(CFLAGS) -shared -o $@ libocas.c libqp_splx.c
+$(LIBFILE): libocas.c libocas.h libqp_splx.c libqp.h
+ $(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) -shared \
+ -Wl,-soname,libocas.so.$(LVER) \
+ -o $@ libocas.c libqp_splx.c $(LIB_LIBS)
+ ln -s $@ libocas.so.$(LVER)
+ ln -s libocas.so.$(LVER) libocas.so
-
--libocas.so: libocas.c libocas.h libqp_splx.c libqp.h
-- $(CC) $(CFLAGS) -shared -o $@ libocas.c libqp_splx.c
++
+libocas.a:
+ $(CXX) $(CFLAGS) $(LDFLAGS) -c -o libocas-static.o libocas.c
+ $(CXX) $(CFLAGS) $(LDFLAGS) -c -o libqp_splx-static.o libqp_splx.c
@@ -83,4 +83,3 @@ index 2ed4145..7ddb88e 100644
clean:
- rm -f *~ svmocas.$(MEXSUFFIX) svmlight_linclass.$(MEXSUFFIX) svmocas msvmocas linclass libocas.so msvmocas.$(MEXSUFFIX) lbpfilter.$(MEXSUFFIX) lbppyr_features.$(MEXSUFFIX) svmocas_lbp.$(MEXSUFFIX) lbppyr.$(MEXSUFFIX) compute_errors.$(MEXSUFFIX)
+ rm -f *~ *.o libocas.a svmocas.$(MEXSUFFIX) svmlight_linclass.$(MEXSUFFIX) svmocas msvmocas linclass libocas.so* msvmocas.$(MEXSUFFIX) lbpfilter.$(MEXSUFFIX) lbppyr_features.$(MEXSUFFIX) svmocas_lbp.$(MEXSUFFIX) lbppyr.$(MEXSUFFIX) compute_errors.$(MEXSUFFIX)
---
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libocas.git
More information about the debian-science-commits
mailing list