~ubuntu-branches/ubuntu/natty/suitesparse/natty

« back to all changes in this revision

Viewing changes to debian/patches/09-CSparse_Lib_Makefile.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere, Rafael Laboissiere, Ondrej Certik
  • Date: 2008-02-21 14:46:50 UTC
  • mfrom: (1.1.2 upstream) (5.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20080221144650-tgeppgj0t7s759i8
Tags: 3.1.0-3
[ Rafael Laboissiere ]
* Upload to unstable

[ Ondrej Certik ]
* XS-DM-Upload-Allowed: yes field added
* Ondrej Certik added to uploaders

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 09-CSparse_Lib_Makefile.dpatch by Daniel Rus Morales <danirus@tol-project.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Build shared version of CSparse library.
 
6
 
 
7
@DPATCH@
 
8
diff -u upstrm/CSparse/Lib/Makefile debsrc/CSparse/Lib/Makefile
 
9
--- upstrm/CSparse/Lib/Makefile 2007-05-05 22:46:13.000000000 +0200
 
10
+++ debsrc/CSparse/Lib/Makefile 2007-12-15 19:08:44.000000000 +0100
 
11
@@ -1,11 +1,13 @@
 
12
 # Modify the "-O" optimization option for best performance (-O3 on Linux):
 
13
-CC = cc
 
14
-CFLAGS = -O -I../Include
 
15
+#CC = cc
 
16
+#CFLAGS = -O -I../Include
 
17
+
 
18
+C = $(CC) -O -I../Include
 
19
 
 
20
 AR = ar cr
 
21
 RANLIB = ranlib
 
22
 
 
23
-all: libcsparse.a
 
24
+all: libcsparse.a libcsparse.so.3.1.0
 
25
 
 
26
 CS = cs_add.o cs_amd.o cs_chol.o cs_cholsol.o cs_counts.o cs_cumsum.o \
 
27
        cs_droptol.o cs_dropzeros.o cs_dupl.o cs_entry.o \
 
28
@@ -16,18 +18,29 @@
 
29
        cs_transpose.o cs_compress.o cs_usolve.o cs_utsolve.o cs_scc.o \
 
30
        cs_maxtrans.o cs_dmperm.o cs_updown.o cs_print.o cs_norm.o cs_load.o \
 
31
        cs_dfs.o cs_reach.o cs_spsolve.o cs_ereach.o cs_leaf.o cs_randperm.o
 
32
+CS_SL = $(subst .o,.oo,$(CS))
 
33
 
 
34
 $(CS): ../Include/cs.h Makefile
 
35
+$(CS_SL): ../Include/cs.h Makefile
 
36
 
 
37
 %.o: ../Source/%.c ../Include/cs.h
 
38
-       $(CC) $(CFLAGS) -c $<
 
39
+       $(C) -c $<
 
40
+%.oo: ../Source/%.c ../Include/cs.h
 
41
+       $(C) -fPIC -c $< -o $@
 
42
 
 
43
 libcsparse.a: $(CS)
 
44
        $(AR) libcsparse.a $(CS)
 
45
        $(RANLIB) libcsparse.a
 
46
 
 
47
+libcsparse.so.3.1.0: $(CS_SL)
 
48
+       $(CC) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
 
49
+       ln -s $@ libcsparse.so
 
50
+
 
51
 clean:
 
52
        rm -f *.o
 
53
+       rm -f *.o *.oo
 
54
+       -$(RM) *.a
 
55
+       -$(RM) *.so*
 
56
 
 
57
 purge: distclean
 
58