Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 173900 | Differences between
and this patch

Collapse All | Expand All

(-)COLAMD_orig/Demo/Makefile (-43 lines)
Lines 1-43 Link Here
1
#-----------------------------------------------------------------------------
2
# compile the COLAMD demo
3
#-----------------------------------------------------------------------------
4
5
default: colamd_example colamd_l_example
6
7
include ../../UFconfig/UFconfig.mk
8
9
I = -I../Include -I../../UFconfig
10
11
C = $(CC) $(CFLAGS) $(I)
12
13
library:
14
	( cd ../Lib ; $(MAKE) )
15
16
#------------------------------------------------------------------------------
17
# Create the demo program, run it, and compare the output
18
#------------------------------------------------------------------------------
19
20
dist:
21
22
colamd_example: colamd_example.c library
23
	$(C) -o colamd_example colamd_example.c ../Lib/libcolamd.a -lm
24
	- ./colamd_example > my_colamd_example.out
25
	- diff colamd_example.out my_colamd_example.out
26
27
colamd_l_example: colamd_l_example.c library
28
	$(C) -o colamd_l_example colamd_l_example.c ../Lib/libcolamd.a -lm
29
	- ./colamd_l_example > my_colamd_l_example.out
30
	- diff colamd_example.out my_colamd_example.out
31
32
#------------------------------------------------------------------------------
33
# Remove all but the files in the original distribution
34
#------------------------------------------------------------------------------
35
36
clean:
37
	- $(RM) $(CLEAN)
38
39
purge: distclean
40
41
distclean: clean
42
	- $(RM) colamd_example colamd_l_example
43
	- $(RM) my_colamd_example.out my_colamd_l_example.out
(-)COLAMD_orig/Demo/Makefile.am (+23 lines)
Line 0 Link Here
1
LDADD = $(top_builddir)/Lib/libcolamd.la
2
AM_CFLAGS = -I$(top_srcdir)/Include
3
4
check_PROGRAMS = colamd_example colamd_l_example
5
colamd_example_SOURCES = colamd_example.c
6
colamd_example_LDADD = $(LDADD)
7
colamd_l_example_SOURCES = colamd_l_example.c
8
colamd_l_example_CPPFLAGS = -DDLONG
9
colamd_l_example_LDADD = $(LDADD)
10
11
12
test: $(check_PROGRAMS)
13
	@for i in $(check_PROGRAMS); do \
14
		echo "Testing $$i"; \
15
		./$$i > my_$$i.out; \
16
		if ! diff $$i.out my_$$i.out; then \
17
       		echo "Testing $$i failed"; \
18
       		exit 1; \
19
   		fi \
20
	done;
21
22
clean-local:
23
	rm -f my*.out
(-)COLAMD_orig/Lib/Makefile (-32 lines)
Lines 1-32 Link Here
1
#-------------------------------------------------------------------------------
2
# COLAMD Makefile
3
#-------------------------------------------------------------------------------
4
5
default: libcolamd.a
6
7
include ../../UFconfig/UFconfig.mk
8
9
I = -I../Include -I../../UFconfig
10
11
INC = ../Include/colamd.h ../../UFconfig/UFconfig.h
12
13
SRC = ../Source/colamd.c ../Source/colamd_global.c
14
15
# creates libcolamd.a, a C-callable COLAMD library
16
libcolamd.a:  $(SRC) $(INC)
17
	$(CC) $(CFLAGS) $(I) -c ../Source/colamd_global.c
18
	$(CC) $(CFLAGS) $(I) -c ../Source/colamd.c
19
	$(CC) $(CFLAGS) $(I) -c ../Source/colamd.c -DDLONG -o colamd_l.o
20
	$(AR) libcolamd.a colamd.o colamd_l.o colamd_global.o
21
22
ccode: libcolamd.a
23
24
library: libcolamd.a
25
26
clean:
27
	- $(RM) $(CLEAN)
28
29
purge: distclean
30
31
distclean: clean
32
	- $(RM) libcolamd.a
(-)COLAMD_orig/Lib/Makefile.am (+11 lines)
Line 0 Link Here
1
AM_CFLAGS = -I$(top_builddir)/Include
2
lib_LTLIBRARIES = libcolamd.la
3
noinst_LTLIBRARIES = libcolamdi.la libcolamdl.la
4
5
libcolamdl_la_SOURCES = $(top_srcdir)/Source/colamd.c
6
libcolamdl_la_CPPFLAGS = -DDLONG
7
8
libcolamdi_la_SOURCES = $(top_srcdir)/Source/colamd.c
9
10
libcolamd_la_SOURCES =  $(top_srcdir)/Source/colamd_global.c
11
libcolamd_la_LIBADD = libcolamdi.la libcolamdl.la
(-)COLAMD_orig/MATLAB/Makefile (-35 lines)
Lines 1-35 Link Here
1
# COLAMD Makefile for MATLAB mexFunctions
2
3
default: colamd2 symamd2
4
5
include ../../UFconfig/UFconfig.mk
6
7
I = -I../../UFconfig -I../Include
8
9
INC = ../Include/colamd.h ../../UFconfig/UFconfig.h
10
11
SRC = ../Source/colamd.c ../Source/colamd_global.c
12
13
MX = $(MEX) -DDLONG $(I)
14
15
# Compiles the MATLAB-callable routines
16
mex: colamd2 symamd2
17
18
symamd2: symamdmex.c $(INC) $(SRC)
19
	$(MX) -output symamd2mex symamdmex.c $(SRC)
20
21
colamd2: colamdmex.c $(INC) $(SRC)
22
	$(MX) -output colamd2mex colamdmex.c $(SRC)
23
24
# Compiles the extensive test code
25
test: mex colamdtestmex.c symamdtestmex.c $(INC) $(SRC)
26
	$(MX) colamdtestmex.c $(SRC)
27
	$(MX) symamdtestmex.c $(SRC)
28
29
clean:
30
	- $(RM) $(CLEAN)
31
32
purge: distclean
33
34
distclean: clean
35
	- $(RM) *.mex* *.dll
(-)COLAMD_orig/Makefile (-49 lines)
Lines 1-49 Link Here
1
#------------------------------------------------------------------------------
2
# COLAMD Makefile
3
#------------------------------------------------------------------------------
4
5
default: demo
6
7
include ../UFconfig/UFconfig.mk
8
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
26
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) )
(-)COLAMD_orig/Makefile.am (+3 lines)
Line 0 Link Here
1
include_HEADERS = $(top_srcdir)/Include/colamd.h
2
EXTRA_DIST = README.txt
3
SUBDIRS = Lib/ Demo/ 
(-)COLAMD_orig/configure.ac (+13 lines)
Line 0 Link Here
1
#                                               -*- Autoconf -*-
2
AC_PREREQ(2.59)
3
AC_INIT(colamd, 2.7.0, davis@cise.ufl.edu)
4
AM_INIT_AUTOMAKE([foreign])
5
AC_PROG_INSTALL
6
AC_PROG_LIBTOOL
7
AC_CHECK_LIB(m, sqrt)
8
AC_CHECK_HEADER( UFconfig.h )
9
AC_OUTPUT(
10
    Makefile \
11
    Demo/Makefile \
12
    Lib/Makefile)
13

Return to bug 173900