]> git.pld-linux.org Git - packages/COLAMD.git/blob - colamd-shared.patch
- updated shared patch to use -lm when linking the library
[packages/COLAMD.git] / colamd-shared.patch
1 --- COLAMD/Makefile~    2007-03-27 02:02:53.388937452 +0300
2 +++ COLAMD/Makefile     2007-03-27 02:02:58.359049009 +0300
3 @@ -1,25 +1,26 @@
4  
5 -default: libcolamd.a colamd_example colamd_l_example
6 +default: libcolamd.la colamd_example colamd_l_example
7 +libdir := /usr/lib
8  
9  include /usr/share/misc/UFconfig.mk
10  
11 -colamd_example: colamd_example.c libcolamd.a
12 -       $(CC) $(CFLAGS) $(I) -o colamd_example colamd_example.c libcolamd.a -lm
13 +colamd_example: colamd_example.c libcolamd.la
14 +       libtool --tag=CC --mode=link $(CC) $(CFLAGS) $(I) -o colamd_example colamd_example.c libcolamd.la -lm
15         - ./colamd_example > my_colamd_example.out
16         - diff colamd_example.out my_colamd_example.out
17  
18 -colamd_l_example: colamd_l_example.c libcolamd.a
19 -       $(CC) $(CFLAGS) $(I) -o colamd_l_example colamd_l_example.c libcolamd.a -lm
20 +colamd_l_example: colamd_l_example.c libcolamd.la
21 +       libtool --tag=CC --mode=link $(CC) $(CFLAGS) $(I) -o colamd_l_example colamd_l_example.c libcolamd.la -lm
22         - ./colamd_l_example > my_colamd_l_example.out
23         - diff colamd_example.out my_colamd_example.out
24  
25  purge: distclean
26  
27  distclean: clean2
28 -       - $(RM) libcolamd.a
29 +       - $(RM) libcolamd.la
30  
31  clean2: clean
32 -       - $(RM) *.o *.dll colamd_example colamd_l_example
33 +       - $(RM) *.o *.la *.a *.so *.dll colamd_example colamd_l_example
34         - $(RM) colamd2mex.mex* symamd2mex.mex*
35         - $(RM) colamdtestmex.mex* symamdtestmex.mex*
36         - $(RM) my_colamd_example.out my_colamd_l_example.out
37 @@ -35,15 +36,20 @@
38         $(MEX) $(I) symamdtestmex.c libcolamd.a
39  
40  # creates libcolamd.a, a C-callable COLAMD library
41 -libcolamd.a:  colamd.c colamd_global.c colamd.h
42 -       $(CC) $(CFLAGS) $(I) -c colamd_global.c
43 -       $(CC) $(CFLAGS) $(I) -c colamd.c
44 -       $(CC) $(CFLAGS) $(I) -c colamd.c -DDLONG -o colamd_l.o
45 -       $(AR) libcolamd.a colamd.o colamd_l.o colamd_global.o
46 +libcolamd.a: libcolamd.la
47 +libcolamd.la:  colamd.c colamd_global.c colamd.h
48 +       libtool --tag=CC --mode=compile $(CC) $(CFLAGS) $(I) -c colamd_global.c
49 +       libtool --tag=CC --mode=compile $(CC) $(CFLAGS) $(I) -c colamd.c
50 +       libtool --tag=CC --mode=compile $(CC) $(CFLAGS) $(I) -c colamd.c -DDLONG -o colamd_l.o
51 +       libtool --tag=CC --mode=link $(CC) -o libcolamd.la -rpath $(libdir) colamd.lo colamd_l.lo colamd_global.lo -lm
52 +
53 +install: libcolamd.la
54 +       install -d $(DESTDIR)$(libdir)
55 +       libtool --mode=install cp libcolamd.la $(DESTDIR)$(libdir)/libcolamd.la
56  
57 -ccode: libcolamd.a
58 +ccode: libcolamd.la
59  
60 -library: libcolamd.a
61 +library: libcolamd.la
62  
63  clean:
64         - $(RM) $(CLEAN)
This page took 0.060314 seconds and 3 git commands to generate.