1
#------------------------------------------------------------------------------
3
#------------------------------------------------------------------------------
2
default: ccolamd_example ccolamd_l_example libccolamd.a
4
7
include ../UFconfig/UFconfig.mk
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
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
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
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
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
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
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) )