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

(-)CAMD_orig/Demo/Makefile (-57 lines)
Lines 1-57 Link Here
1
#-----------------------------------------------------------------------------
2
# compile the CAMD demo (for both GNU make or original make)
3
#-----------------------------------------------------------------------------
4
5
default: camd_simple camd_demo camd_demo2 camd_l_demo
6
7
include ../../UFconfig/UFconfig.mk
8
9
C = $(CC) $(CFLAGS) $(CONFIG) -I../Include -I../../UFconfig
10
11
UFCONFIG = ../../UFconfig/UFconfig.h
12
13
INC = ../Include/camd.h $(UFCONFIG)
14
15
library:
16
	( cd ../Lib ; $(MAKE) )
17
18
#------------------------------------------------------------------------------
19
# Create the demo program, run it, and compare the output
20
#------------------------------------------------------------------------------
21
22
dist:
23
24
camd_demo: camd_demo.c library $(INC)
25
	$(C) -o camd_demo camd_demo.c ../Lib/libcamd.a $(LIB)
26
	./camd_demo > my_camd_demo.out
27
	- diff camd_demo.out my_camd_demo.out
28
29
camd_l_demo: camd_l_demo.c library $(INC)
30
	$(C) -o camd_l_demo camd_l_demo.c ../Lib/libcamd.a $(LIB)
31
	./camd_l_demo > my_camd_l_demo.out
32
	- diff camd_l_demo.out my_camd_l_demo.out
33
34
camd_demo2: camd_demo2.c library $(INC)
35
	$(C) -o camd_demo2 camd_demo2.c ../Lib/libcamd.a $(LIB)
36
	./camd_demo2 > my_camd_demo2.out
37
	- diff camd_demo2.out my_camd_demo2.out
38
39
camd_simple: camd_simple.c library $(INC)
40
	$(C) -o camd_simple camd_simple.c ../Lib/libcamd.a $(LIB)
41
	./camd_simple > my_camd_simple.out
42
	- diff camd_simple.out my_camd_simple.out
43
44
#------------------------------------------------------------------------------
45
# Remove all but the files in the original distribution
46
#------------------------------------------------------------------------------
47
48
clean:
49
	- $(RM) $(CLEAN)
50
51
purge: distclean
52
53
distclean: clean
54
	- $(RM) camd_demo my_camd_demo.out
55
	- $(RM) camd_l_demo my_camd_l_demo.out
56
	- $(RM) camd_demo2 my_camd_demo2.out
57
	- $(RM) camd_simple my_camd_simple.out
(-)CAMD_orig/Demo/Makefile.am (+32 lines)
Line 0 Link Here
1
AM_CPPFLAGS = -I$(top_srcdir)/Include
2
AM_LDFLAGS = -lm
3
check_PROGRAMS = \
4
	camd_demo \
5
	camd_l_demo \
6
	camd_demo2 \
7
	camd_simple
8
9
camd_demo_SOURCES = camd_demo.c
10
camd_demo_LDADD = $(top_builddir)/Source/libcamd.la
11
12
camd_l_demo_SOURCES = camd_l_demo.c
13
camd_l_demo_LDADD = $(top_builddir)/Source/libcamd.la
14
15
camd_demo2_SOURCES = camd_demo2.c
16
camd_demo2_LDADD = $(top_builddir)/Source/libcamd.la
17
18
camd_simple_SOURCES = camd_simple.c
19
camd_simple_LDADD = $(top_builddir)/Source/libcamd.la
20
21
test: $(check_PROGRAMS)
22
	@for i in $(check_PROGRAMS); do \
23
		echo "Testing $$i"; \
24
		./$$i > my_$$i.out; \
25
		if ! diff $$i.out my_$$i.out; then \
26
			echo "Test $$i failed!"; \
27
			exit 1; \
28
		fi \
29
	done;
30
31
clean-local:
32
	rm -f my*.out
(-)CAMD_orig/Makefile (-57 lines)
Lines 1-57 Link Here
1
#------------------------------------------------------------------------------
2
# CAMD Makefile (for GNU Make or original make)
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 compile the FORTRAN versions, or 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
# Do not compile the FORTRAN versions.
17
all:
18
	( cd Lib    ; $(MAKE) )
19
	( cd Demo   ; $(MAKE) )
20
	( cd MATLAB ; $(MAKE) )
21
22
# compile just the C-callable libraries (not mexFunctions or Demos)
23
library:
24
	( cd Lib    ; $(MAKE) )
25
26
# remove object files, but keep the compiled programs and library archives
27
clean:
28
	( cd Lib    ; $(MAKE) clean )
29
	( cd Demo   ; $(MAKE) clean )
30
	( cd MATLAB ; $(MAKE) clean )
31
	( cd Doc    ; $(MAKE) clean )
32
33
# clean, and then remove compiled programs and library archives
34
purge:
35
	( cd Lib    ; $(MAKE) purge )
36
	( cd Demo   ; $(MAKE) purge )
37
	( cd MATLAB ; $(MAKE) purge )
38
	( cd Doc    ; $(MAKE) purge )
39
40
distclean: purge
41
42
# create PDF documents for the original distribution
43
doc:
44
	( cd Doc    ; $(MAKE) )
45
46
# get ready for distribution
47
dist: purge
48
	( cd Demo   ; $(MAKE) dist )
49
	( cd Doc    ; $(MAKE) )
50
51
ccode: library
52
53
lib: library
54
55
# compile the MATLAB mexFunction
56
mex:
57
	( cd MATLAB ; $(MAKE) )
(-)CAMD_orig/Makefile.am (+3 lines)
Line 0 Link Here
1
SUBDIRS = Demo Source
2
EXTRA_DIST = README.txt
3
include_HEADERS = Include/camd.h Include/camd_internal.h
(-)CAMD_orig/Source/Makefile.am (+14 lines)
Line 0 Link Here
1
CAMDCSRC = camd_aat.c camd_1.c camd_2.c camd_dump.c camd_postorder.c camd_defaults.c \
2
	camd_order.c camd_control.c camd_info.c camd_valid.c camd_preprocess.c
3
4
lib_LTLIBRARIES = libcamd.la
5
noinst_LTLIBRARIES = libcamdi.la libcamdl.la
6
AM_CPPFLAGS = -I$(top_srcdir)/Include
7
8
libcamdi_la_SOURCES = $(CAMDCSRC)
9
libcamdi_la_CPPFLAGS = $(AM_CPPFLAGS) -DDINT
10
libcamdl_la_SOURCES = $(CAMDCSRC)
11
libcamdl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
12
13
libcamd_la_SOURCES = camd_global.c
14
libcamd_la_LIBADD = libcamdl.la libcamdi.la
(-)CAMD_orig/configure.ac (+12 lines)
Line 0 Link Here
1
#                                               -*- Autoconf -*-
2
AC_PREREQ(2.59)
3
AC_INIT(camd, 2.2.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_HEADERS(UFconfig.h)
9
AC_CONFIG_FILES([Source/Makefile
10
		 Demo/Makefile
11
		 Makefile])
12
AC_OUTPUT

Return to bug 173900