]>
Commit | Line | Data |
---|---|---|
3029277c JR |
1 | diff -ur CCOLAMD/Demo/Makefile CCOLAMD-shared/Demo/Makefile |
2 | --- CCOLAMD/Demo/Makefile 2007-12-02 15:48:48.000000000 +0100 | |
3 | +++ CCOLAMD-shared/Demo/Makefile 2007-12-02 15:48:31.000000000 +0100 | |
4 | @@ -20,12 +20,12 @@ | |
5 | dist: | |
6 | ||
7 | ccolamd_example: ccolamd_example.c library | |
8 | - $(C) -o ccolamd_example ccolamd_example.c ../Lib/libccolamd.a -lm | |
9 | + libtool --tag=CC --mode=link $(CC) $(CFLAGS) $(I) -o ccolamd_example ccolamd_example.c ../Lib/libccolamd.la -lm | |
10 | - ./ccolamd_example > my_ccolamd_example.out | |
11 | - diff ccolamd_example.out my_ccolamd_example.out | |
12 | ||
13 | ccolamd_l_example: ccolamd_l_example.c library | |
14 | - $(C) -o ccolamd_l_example ccolamd_l_example.c ../Lib/libccolamd.a -lm | |
15 | + libtool --tag=CC --mode=link $(CC) $(CFLAGS) $(I) -o ccolamd_l_example ccolamd_l_example.c ../Lib/libccolamd.la -lm | |
16 | - ./ccolamd_l_example > my_ccolamd_l_example.out | |
17 | - diff ccolamd_example.out my_ccolamd_example.out | |
18 | ||
19 | diff -ur CCOLAMD/Lib/Makefile CCOLAMD-shared/Lib/Makefile | |
20 | --- CCOLAMD/Lib/Makefile 2007-12-02 15:48:48.000000000 +0100 | |
21 | +++ CCOLAMD-shared/Lib/Makefile 2007-12-02 15:47:12.000000000 +0100 | |
22 | @@ -2,7 +2,8 @@ | |
23 | # CCOLAMD Makefile | |
24 | #------------------------------------------------------------------------------- | |
25 | ||
26 | -default: libccolamd.a | |
27 | +default: libccolamd.la | |
28 | +libdir := /usr/lib | |
29 | ||
30 | include /usr/share/misc/UFconfig.mk | |
31 | ||
32 | @@ -13,15 +14,20 @@ | |
33 | SRC = ../Source/ccolamd.c ../Source/ccolamd_global.c | |
34 | ||
35 | # creates libccolamd.a, a C-callable COLAMD library | |
36 | -libccolamd.a: $(SRC) $(INC) | |
37 | - $(CC) $(CFLAGS) $(I) -c ../Source/ccolamd_global.c | |
38 | - $(CC) $(CFLAGS) $(I) -c ../Source/ccolamd.c | |
39 | - $(CC) $(CFLAGS) $(I) -c ../Source/ccolamd.c -DDLONG -o ccolamd_l.o | |
40 | - $(AR) libccolamd.a ccolamd.o ccolamd_l.o ccolamd_global.o | |
41 | +libccolamd.a: libccolamd.la | |
42 | +libccolamd.la: $(SRC) $(INC) | |
43 | + libtool --tag=CC --mode=compile $(CC) $(CFLAGS) $(I) -c ../Source/ccolamd_global.c | |
44 | + libtool --tag=CC --mode=compile $(CC) $(CFLAGS) $(I) -c ../Source/ccolamd.c | |
45 | + libtool --tag=CC --mode=compile $(CC) $(CFLAGS) $(I) -c ../Source/ccolamd.c -DDLONG -o ccolamd_l.o | |
46 | + libtool --tag=CC --mode=link $(CC) -o libccolamd.la -rpath $(libdir) ccolamd.o ccolamd_l.o ccolamd_global.o -lm | |
47 | + | |
48 | +install: libccolamd.la | |
49 | + install -d $(DESTDIR)$(libdir) | |
50 | + libtool --mode=install cp libccolamd.la $(DESTDIR)$(libdir)/libccolamd.la | |
51 | ||
52 | -ccode: libccolamd.a | |
53 | +ccode: libccolamd.la | |
54 | ||
55 | -library: libccolamd.a | |
56 | +library: libccolamd.la | |
57 | ||
58 | clean: | |
59 | - $(RM) $(CLEAN) | |
60 | @@ -29,4 +35,4 @@ | |
61 | purge: distclean | |
62 | ||
63 | distclean: clean | |
64 | - - $(RM) libccolamd.a | |
65 | + - $(RM) libccolamd.la |