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

« back to all changes in this revision

Viewing changes to CCOLAMD/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
# CCOLAMD Makefile
 
3
#------------------------------------------------------------------------------
1
4
 
2
 
default: ccolamd_example ccolamd_l_example libccolamd.a
 
5
default: demo
3
6
 
4
7
include ../UFconfig/UFconfig.mk
5
8
 
6
 
I = -I../UFconfig
7
 
 
8
 
ccolamd_example:  ccolamd_example.c libccolamd.a
9
 
        $(CC) $(CFLAGS) $(I) -o ccolamd_example ccolamd_example.c libccolamd.a -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 libccolamd.a
14
 
        $(CC) $(CFLAGS) $(I) -o ccolamd_l_example ccolamd_l_example.c libccolamd.a -lm
15
 
        - ./ccolamd_l_example > my_ccolamd_l_example.out
16
 
        - diff ccolamd_l_example.out my_ccolamd_l_example.out
17
 
 
18
 
purge: distclean
19
 
 
20
 
distclean: clean2
21
 
        - $(RM) libccolamd.a
22
 
 
23
 
clean2: clean
24
 
        - $(RM) *.o *.dll ccolamd_example ccolamd_l_example
25
 
        - $(RM) ccolamd.mex* csymamd.mex*
26
 
        - $(RM) ccolamdtestmex.mex* csymamdtestmex.mex*
27
 
        - $(RM) my_ccolamd_example.out my_ccolamd_l_example.out
28
 
 
29
 
# Compiles the MATLAB-callable routines
30
 
mex: ccolamdmex.c csymamdmex.c libccolamd.a
31
 
        $(MEX) $(I) -output ccolamd ccolamdmex.c libccolamd.a
32
 
        $(MEX) $(I) -output csymamd csymamdmex.c libccolamd.a
33
 
 
34
 
# Compiles the extensive test code
35
 
test: mex ccolamdtestmex.c csymamdtestmex.c libccolamd.a
36
 
        $(MEX) $(I) ccolamdtestmex.c libccolamd.a
37
 
        $(MEX) $(I) csymamdtestmex.c libccolamd.a
38
 
 
39
 
# creates libccolamd.a, a C-callable CCOLAMD library
40
 
libccolamd.a:  ccolamd.c ccolamd_global.c ccolamd.h
41
 
        $(CC) $(CFLAGS) $(I) -c ccolamd_global.c
42
 
        $(CC) $(CFLAGS) $(I) -c ccolamd.c
43
 
        $(CC) $(CFLAGS) $(I) -c ccolamd.c -DDLONG -o ccolamd_l.o
44
 
        $(AR) libccolamd.a ccolamd.o ccolamd_l.o ccolamd_global.o
45
 
 
46
 
ccode: libccolamd.a
47
 
 
48
 
library: libccolamd.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) )