~logan/ubuntu/trusty/suitesparse/4.2.1-3ubuntu1

« back to all changes in this revision

Viewing changes to debian/patches/02-AMD_Lib_GNUmakefile.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
## 02-AMD_Lib_GNUmakefile.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 AMD library.
 
6
 
 
7
@DPATCH@
 
8
diff -u upstrm/AMD/Lib/GNUmakefile debsrc/AMD/Lib/GNUmakefile
 
9
--- upstrm/AMD/Lib/GNUmakefile  2007-05-06 14:32:19.000000000 +0200
 
10
+++ debsrc/AMD/Lib/GNUmakefile  2007-12-15 19:01:19.000000000 +0100
 
11
@@ -2,7 +2,7 @@
 
12
 # AMD Makefile for compiling on Unix systems (for GNU make only)
 
13
 #-------------------------------------------------------------------------------
 
14
 
 
15
-default: ../Lib/libamd.a
 
16
+default: ../Lib/libamd.a libamd.so.3.1.0
 
17
 
 
18
 include ../../UFconfig/UFconfig.mk
 
19
 
 
20
@@ -26,18 +26,27 @@
 
21
 AMDI = $(addsuffix .o, $(subst amd_,amd_i_,$(AMD)))
 
22
 AMDL = $(addsuffix .o, $(subst amd_,amd_l_,$(AMD)))
 
23
 
 
24
+AMDI_SL = $(addsuffix .oo, $(subst amd_,amd_i_,$(AMD)))
 
25
+AMDL_SL = $(addsuffix .oo, $(subst amd_,amd_l_,$(AMD)))
 
26
+
 
27
 #-------------------------------------------------------------------------------
 
28
 # compile each int and long routine (with no real/complex version)
 
29
 #-------------------------------------------------------------------------------
 
30
 
 
31
 amd_global.o: ../Source/amd_global.c $(INC)
 
32
        $(C) -c $< -o $@
 
33
+amd_global.oo: ../Source/amd_global.c $(INC)
 
34
+       $(C) -fPIC -c $< -o $@
 
35
 
 
36
 amd_i_%.o: ../Source/amd_%.c $(INC)
 
37
        $(C) -DDINT -c $< -o $@
 
38
+amd_i_%.oo: ../Source/amd_%.c $(INC)
 
39
+       $(C) -fPIC -DDINT -c $< -o $@
 
40
 
 
41
 amd_l_%.o: ../Source/amd_%.c $(INC)
 
42
        $(C) -DDLONG -c $< -o $@
 
43
+amd_l_%.oo: ../Source/amd_%.c $(INC)
 
44
+       $(C) -fPIC -DDLONG -c $< -o $@
 
45
 
 
46
 #-------------------------------------------------------------------------------
 
47
 # Create the libamd.a library (C versions only)
 
48
@@ -47,6 +56,10 @@
 
49
        $(AR) ../Lib/libamd.a $^
 
50
        - $(RANLIB) ../Lib/libamd.a
 
51
 
 
52
+libamd.so.3.1.0: amd_global.oo $(AMDI_SL) $(AMDL_SL)
 
53
+       $(CC) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
 
54
+       ln -s $@ libamd.so
 
55
+
 
56
 #-------------------------------------------------------------------------------
 
57
 # compile the Fortran versions and the libamdf77.a library
 
58
 #-------------------------------------------------------------------------------
 
59
@@ -71,6 +85,9 @@
 
60
 
 
61
 clean:
 
62
        - $(RM) $(CLEAN)
 
63
+       -$(RM) *.oo
 
64
+       -$(RM) *.a
 
65
+       -$(RM) *.so*
 
66
 
 
67
 purge: distclean
 
68