public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sci-libs/libsvm/files: 3.14-makefile.patch
@ 2012-11-29 19:04 Sebastien Fabbro (bicatali)
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastien Fabbro (bicatali) @ 2012-11-29 19:04 UTC (permalink / raw
  To: gentoo-commits

bicatali    12/11/29 19:04:49

  Added:                3.14-makefile.patch
  Log:
  Version bump, update patch
  
  (Portage version: 2.2.01.21313-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)

Revision  Changes    Path
1.1                  sci-libs/libsvm/files/3.14-makefile.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libsvm/files/3.14-makefile.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libsvm/files/3.14-makefile.patch?rev=1.1&content-type=text/plain

Index: 3.14-makefile.patch
===================================================================
* respect CFLAGS and CXXFLAGS from user
* compile with CC for C and CXX for C++ files
* propagate and respect user's LDFLAGS
* PIC only used for the library
* link the shared version library
nov 2012 - bicatali@gentoo.org

--- Makefile.orig	2012-11-29 10:39:07.149421728 -0800
+++ Makefile	2012-11-29 10:57:19.727766521 -0800
@@ -1,9 +1,12 @@
 CXX ?= g++
-CFLAGS = -Wall -Wconversion -O3 -fPIC
+CC ?= gcc
+CFLAGS ?= -Wall -Wconversion -O3
+CXXFLAGS ?= $(CFLAGS)
 SHVER = 2
 OS = $(shell uname)
+PICFLAGS ?= -fPIC
 
-all: svm-train svm-predict svm-scale
+all: svm-train svm-predict svm-scale lib
 
 lib: svm.o
 	if [ "$(OS)" = "Darwin" ]; then \
@@ -11,15 +14,20 @@
 	else \
 		SHARED_LIB_FLAG="-shared -Wl,-soname,libsvm.so.$(SHVER)"; \
 	fi; \
-	$(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER)
+	$(CXX) $(LDFLAGS) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER) ; \
+	ln -s libsvm.so.$(SHVER) libsvm.so
 
 svm-predict: svm-predict.c svm.o
-	$(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm
+	$(CC) $(CFLAGS) -c $@.c -o $@.o
+	$(CXX) $(LDFLAGS) $@.o svm.o -lm -o $@
 svm-train: svm-train.c svm.o
-	$(CXX) $(CFLAGS) svm-train.c svm.o -o svm-train -lm
+	$(CC) $(CFLAGS) -c $@.c -o $@.o
+	$(CXX) $(LDFLAGS) $@.o svm.o -lm -o $@
 svm-scale: svm-scale.c
-	$(CXX) $(CFLAGS) svm-scale.c -o svm-scale
+	$(CC) $(CFLAGS) -c $@.c -o $@.o
+	$(CXX) $(LDFLAGS) $@.o svm.o -o $@
+
 svm.o: svm.cpp svm.h
-	$(CXX) $(CFLAGS) -c svm.cpp
+	$(CXX) $(CXXFLAGS) $(PICFLAGS) -c svm.cpp
 clean:
-	rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER)
+	rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER) libsvm.so





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sci-libs/libsvm/files: 3.14-makefile.patch
@ 2012-12-04 18:40 Sebastien Fabbro (bicatali)
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastien Fabbro (bicatali) @ 2012-12-04 18:40 UTC (permalink / raw
  To: gentoo-commits

bicatali    12/12/04 18:40:13

  Modified:             3.14-makefile.patch
  Log:
  Fixed parallel build, bug #445312
  
  (Portage version: 2.2.0_alpha144/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)

Revision  Changes    Path
1.2                  sci-libs/libsvm/files/3.14-makefile.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libsvm/files/3.14-makefile.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libsvm/files/3.14-makefile.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/libsvm/files/3.14-makefile.patch?r1=1.1&r2=1.2

Index: 3.14-makefile.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sci-libs/libsvm/files/3.14-makefile.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 3.14-makefile.patch	29 Nov 2012 19:04:49 -0000	1.1
+++ 3.14-makefile.patch	4 Dec 2012 18:40:12 -0000	1.2
@@ -41,11 +41,11 @@
  svm-scale: svm-scale.c
 -	$(CXX) $(CFLAGS) svm-scale.c -o svm-scale
 +	$(CC) $(CFLAGS) -c $@.c -o $@.o
-+	$(CXX) $(LDFLAGS) $@.o svm.o -o $@
++	$(CXX) $(LDFLAGS) $@.o -o $@
 +
  svm.o: svm.cpp svm.h
 -	$(CXX) $(CFLAGS) -c svm.cpp
-+	$(CXX) $(CXXFLAGS) $(PICFLAGS) -c svm.cpp
++	$(CXX) $(CXXFLAGS) $(PICFLAGS) -c svm.cpp -o $@
  clean:
 -	rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER)
 +	rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER) libsvm.so





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-04 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-04 18:40 [gentoo-commits] gentoo-x86 commit in sci-libs/libsvm/files: 3.14-makefile.patch Sebastien Fabbro (bicatali)
  -- strict thread matches above, loose matches on Subject: below --
2012-11-29 19:04 Sebastien Fabbro (bicatali)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox