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

« back to all changes in this revision

Viewing changes to COLAMD/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-05-29 09:36:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529093629-zowquo0b7slkk6nc
Tags: 3.0.0-2
* suitesparse builds properly twice in a row
* Bug fix: "suitesparse - FTBFS: Broken build depens: libgfortran1-dev",
  thanks to Bastian Blank (Closes: #426349).
* Bug fix: "suitesparse_3.0.0-1: FTBFS: build-depends on
  libgfortran1-dev", thanks to Steve Langasek (Closes: #426354).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#------------------------------------------------------------------------------
 
2
# COLAMD Makefile
 
3
#------------------------------------------------------------------------------
1
4
 
2
 
default: libcolamd.a colamd_example colamd_l_example
 
5
default: demo
3
6
 
4
7
include ../UFconfig/UFconfig.mk
5
8
 
6
 
I = -I../UFconfig
7
 
 
8
 
colamd_example: colamd_example.c libcolamd.a
9
 
        $(CC) $(CFLAGS) $(I) -o colamd_example colamd_example.c libcolamd.a -lm
10
 
        - ./colamd_example > my_colamd_example.out
11
 
        - diff colamd_example.out my_colamd_example.out
12
 
 
13
 
colamd_l_example: colamd_l_example.c libcolamd.a
14
 
        $(CC) $(CFLAGS) $(I) -o colamd_l_example colamd_l_example.c libcolamd.a -lm
15
 
        - ./colamd_l_example > my_colamd_l_example.out
16
 
        - diff colamd_example.out my_colamd_example.out
17
 
 
18
 
purge: distclean
19
 
 
20
 
distclean: clean2
21
 
        - $(RM) libcolamd.a
22
 
 
23
 
clean2: clean
24
 
        - $(RM) *.o *.dll colamd_example colamd_l_example
25
 
        - $(RM) colamdmex.mex* symamdmex.mex*
26
 
        - $(RM) colamdtestmex.mex* symamdtestmex.mex*
27
 
        - $(RM) my_colamd_example.out my_colamd_l_example.out
28
 
 
29
 
# Compiles the MATLAB-callable routines
30
 
mex: colamdmex.c symamdmex.c libcolamd.a
31
 
        $(MEX) $(I) colamdmex.c libcolamd.a
32
 
        $(MEX) $(I) symamdmex.c libcolamd.a
33
 
 
34
 
# Compiles the extensive test code
35
 
test: mex colamdtestmex.c symamdtestmex.c libcolamd.a
36
 
        $(MEX) $(I) colamdtestmex.c libcolamd.a
37
 
        $(MEX) $(I) symamdtestmex.c libcolamd.a
38
 
 
39
 
# creates libcolamd.a, a C-callable COLAMD library
40
 
libcolamd.a:  colamd.c colamd_global.c colamd.h
41
 
        $(CC) $(CFLAGS) $(I) -c colamd_global.c
42
 
        $(CC) $(CFLAGS) $(I) -c colamd.c
43
 
        $(CC) $(CFLAGS) $(I) -c colamd.c -DDLONG -o colamd_l.o
44
 
        $(AR) libcolamd.a colamd.o colamd_l.o colamd_global.o
45
 
 
46
 
ccode: libcolamd.a
47
 
 
48
 
library: libcolamd.a
49
 
 
 
9
# Compile all C code, including the C-callable routine and the mexFunctions.
 
10
# Do not the MATLAB interface.
 
11
demo:
 
12
        ( cd Lib    ; $(MAKE) )
 
13
        ( cd Demo   ; $(MAKE) )
 
14
 
 
15
# Compile all C code, including the C-callable routine and the mexFunctions.
 
16
all:
 
17
        ( cd Lib    ; $(MAKE) )
 
18
        ( cd Demo   ; $(MAKE) )
 
19
        ( cd MATLAB ; $(MAKE) )
 
20
 
 
21
# compile just the C-callable libraries (not mexFunctions or Demos)
 
22
library:
 
23
        ( cd Lib    ; $(MAKE) )
 
24
 
 
25
# remove object files, but keep the compiled programs and library archives
50
26
clean:
51
 
        - $(RM) $(CLEAN)
 
27
        ( cd Lib    ; $(MAKE) clean )
 
28
        ( cd Demo   ; $(MAKE) clean )
 
29
        ( cd MATLAB ; $(MAKE) clean )
 
30
 
 
31
# clean, and then remove compiled programs and library archives
 
32
purge:
 
33
        ( cd Lib    ; $(MAKE) purge )
 
34
        ( cd Demo   ; $(MAKE) purge )
 
35
        ( cd MATLAB ; $(MAKE) purge )
 
36
 
 
37
distclean: purge
 
38
 
 
39
# get ready for distribution
 
40
dist: purge
 
41
        ( cd Demo   ; $(MAKE) dist )
 
42
 
 
43
ccode: library
 
44
 
 
45
lib: library
 
46
 
 
47
# compile the MATLAB mexFunction
 
48
mex:
 
49
        ( cd MATLAB ; $(MAKE) )