1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 02-AMD_Lib_GNUmakefile.dpatch by Daniel Rus Morales <danirus@tol-project.org>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Build shared version of AMD library.
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
12
# AMD Makefile for compiling on Unix systems (for GNU make only)
13
#-------------------------------------------------------------------------------
15
-default: ../Lib/libamd.a
16
+default: ../Lib/libamd.a libamd.so.3.1.0
18
include ../../UFconfig/UFconfig.mk
21
AMDI = $(addsuffix .o, $(subst amd_,amd_i_,$(AMD)))
22
AMDL = $(addsuffix .o, $(subst amd_,amd_l_,$(AMD)))
24
+AMDI_SL = $(addsuffix .oo, $(subst amd_,amd_i_,$(AMD)))
25
+AMDL_SL = $(addsuffix .oo, $(subst amd_,amd_l_,$(AMD)))
27
#-------------------------------------------------------------------------------
28
# compile each int and long routine (with no real/complex version)
29
#-------------------------------------------------------------------------------
31
amd_global.o: ../Source/amd_global.c $(INC)
33
+amd_global.oo: ../Source/amd_global.c $(INC)
34
+ $(C) -fPIC -c $< -o $@
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 $@
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 $@
46
#-------------------------------------------------------------------------------
47
# Create the libamd.a library (C versions only)
49
$(AR) ../Lib/libamd.a $^
50
- $(RANLIB) ../Lib/libamd.a
52
+libamd.so.3.1.0: amd_global.oo $(AMDI_SL) $(AMDL_SL)
53
+ $(CC) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
56
#-------------------------------------------------------------------------------
57
# compile the Fortran versions and the libamdf77.a library
58
#-------------------------------------------------------------------------------