]> git.pld-linux.org Git - packages/COLAMD.git/blame - colamd-shared.patch
- use *.lo to link the library
[packages/COLAMD.git] / colamd-shared.patch
CommitLineData
bc1d5db9
JR
1diff -ur COLAMD/Demo/Makefile COLAMD-shared/Demo/Makefile
2--- COLAMD/Demo/Makefile 2007-12-02 15:48:48.000000000 +0100
3+++ COLAMD-shared/Demo/Makefile 2007-12-02 15:48:31.000000000 +0100
4@@ -20,12 +20,12 @@
5 dist:
411aa683 6
bc1d5db9
JR
7 colamd_example: colamd_example.c library
8- $(C) -o colamd_example colamd_example.c ../Lib/libcolamd.a -lm
caad30b9 9+ libtool --tag=CC --mode=link $(CC) $(LDFLAGS) $(CFLAGS) $(I) -o colamd_example colamd_example.c ../Lib/libcolamd.la -lm
411aa683
ER
10 - ./colamd_example > my_colamd_example.out
11 - diff colamd_example.out my_colamd_example.out
12
bc1d5db9
JR
13 colamd_l_example: colamd_l_example.c library
14- $(C) -o colamd_l_example colamd_l_example.c ../Lib/libcolamd.a -lm
caad30b9 15+ libtool --tag=CC --mode=link $(CC) $(LDFLAGS) $(CFLAGS) $(I) -o colamd_l_example colamd_l_example.c ../Lib/libcolamd.la -lm
411aa683
ER
16 - ./colamd_l_example > my_colamd_l_example.out
17 - diff colamd_example.out my_colamd_example.out
18
bc1d5db9
JR
19diff -ur COLAMD/Lib/Makefile COLAMD-shared/Lib/Makefile
20--- COLAMD/Lib/Makefile 2007-12-02 15:48:48.000000000 +0100
21+++ COLAMD-shared/Lib/Makefile 2007-12-02 15:47:12.000000000 +0100
22@@ -2,7 +2,8 @@
23 # COLAMD Makefile
24 #-------------------------------------------------------------------------------
411aa683 25
bc1d5db9
JR
26-default: libcolamd.a
27+default: libcolamd.la
28+libdir := /usr/lib
29
30 include /usr/share/misc/UFconfig.mk
411aa683 31
bc1d5db9
JR
32@@ -13,15 +14,20 @@
33 SRC = ../Source/colamd.c ../Source/colamd_global.c
411aa683
ER
34
35 # creates libcolamd.a, a C-callable COLAMD library
bc1d5db9
JR
36-libcolamd.a: $(SRC) $(INC)
37- $(CC) $(CFLAGS) $(I) -c ../Source/colamd_global.c
38- $(CC) $(CFLAGS) $(I) -c ../Source/colamd.c
39- $(CC) $(CFLAGS) $(I) -c ../Source/colamd.c -DDLONG -o colamd_l.o
411aa683
ER
40- $(AR) libcolamd.a colamd.o colamd_l.o colamd_global.o
41+libcolamd.a: libcolamd.la
bc1d5db9
JR
42+libcolamd.la: $(SRC) $(INC)
43+ libtool --tag=CC --mode=compile $(CC) $(CFLAGS) $(I) -c ../Source/colamd_global.c
44+ libtool --tag=CC --mode=compile $(CC) $(CFLAGS) $(I) -c ../Source/colamd.c
445fa7c7
JB
45+ libtool --tag=CC --mode=compile $(CC) $(CFLAGS) $(I) -c ../Source/colamd.c -DDLONG -o colamd_l.lo
46+ libtool --tag=CC --mode=link $(CC) $(LDFLAGS) -o libcolamd.la -rpath $(libdir) colamd.lo colamd_l.lo colamd_global.lo -lm
411aa683
ER
47+
48+install: libcolamd.la
49+ install -d $(DESTDIR)$(libdir)
50+ libtool --mode=install cp libcolamd.la $(DESTDIR)$(libdir)/libcolamd.la
51
52-ccode: libcolamd.a
53+ccode: libcolamd.la
54
55-library: libcolamd.a
56+library: libcolamd.la
57
58 clean:
59 - $(RM) $(CLEAN)
bc1d5db9
JR
60@@ -29,4 +35,4 @@
61 purge: distclean
62
63 distclean: clean
64- - $(RM) libcolamd.a
65+ - $(RM) libcolamd.la
This page took 0.080442 seconds and 4 git commands to generate.