1
#------------------------------------------------------------------------------
3
#------------------------------------------------------------------------------
2
default: libcolamd.a colamd_example colamd_l_example
4
7
include ../UFconfig/UFconfig.mk
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
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
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
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
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
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
9
# Compile all C code, including the C-callable routine and the mexFunctions.
10
# Do not the MATLAB interface.
15
# Compile all C code, including the C-callable routine and the mexFunctions.
19
( cd MATLAB ; $(MAKE) )
21
# compile just the C-callable libraries (not mexFunctions or Demos)
25
# remove object files, but keep the compiled programs and library archives
27
( cd Lib ; $(MAKE) clean )
28
( cd Demo ; $(MAKE) clean )
29
( cd MATLAB ; $(MAKE) clean )
31
# clean, and then remove compiled programs and library archives
33
( cd Lib ; $(MAKE) purge )
34
( cd Demo ; $(MAKE) purge )
35
( cd MATLAB ; $(MAKE) purge )
39
# get ready for distribution
41
( cd Demo ; $(MAKE) dist )
47
# compile the MATLAB mexFunction
49
( cd MATLAB ; $(MAKE) )