Skip to content

Commit bf7578f

Browse files
committed
Compile the basic and sparse option works
1 parent 48f0bec commit bf7578f

5 files changed

Lines changed: 20 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,24 @@ set(LIST_2 lufactor.c bkpfacto.c chfactor.c qrfactor.c solve.c hsehldr.c
8989
set (LIST_3 sparse.c sprow.c sparseio.c spchfctr.c splufctr.c
9090
spbkp.c spswap.c iter0.c itersym.c iternsym.c)
9191

92+
set (ZLIST1 zmachine.c zcopy.c zmatio.c zmemory.c zvecop.c zmatop.c znorm.c zfunc.c )
93+
94+
set (ZLIST2 zlufctr.c zsolve.c zmatlab.c zhsehldr.c zqrfctr.c zgivens.c zhessen.c zschur.c)
95+
9296
set (OLD_LIST onjgrad.c lanczos.c arnoldi.c)
9397

94-
file(GLOB_RECURSE all_source_files *.c)
95-
file(GLOB_RECURSE all_source_headers *.h)
98+
set(TORTURE torture.c sptort.c ztorture.c memtort.c itertort.c mfuntort.c iotort.c)
99+
100+
set (sources_files ${LIST_1} ${LIST_2})
101+
102+
if(SPARSE)
103+
set(sources_files ${sources_files} ${LIST_3})
104+
endif(SPARSE)
105+
106+
if(COMPLEX)
107+
set (sources_files ${sources_files} ${ZLIST1} ${ZLIST2})
108+
endif(COMPLEX)
96109

97-
add_library(meschach ${all_source_files})
110+
add_library(meschach ${sources_files})
98111

99112

makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ part3: $(LIST3)
8989
ar ru meschach.a $(LIST3)
9090
$(RANLIB) meschach.a
9191

92-
$(ZLIST1): $(HBASDE) zmatrix.h
92+
$(ZLIST1): $(HBASE) zmatrix.h
9393
zpart1: $(ZLIST1)
9494
ar ru meschach.a $(ZLIST1)
9595
$(RANLIB) meschach.a

matlab.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
*/
3434

3535
#include <stdio.h>
36+
#include <string.h>
3637
#include "matrix.h"
3738
#include "matlab.h"
3839

matrixio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ char *f_string;
445445
const char *setformat(const char *f_string)
446446
#endif
447447
{
448-
const char *old_f_string;
448+
static const char *old_f_string;
449449
old_f_string = format;
450450
if ( f_string != (char *)NULL && *f_string != '\0' )
451451
format = f_string;

spbkp.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ static char rcsid[] = "$Id: spbkp.c,v 1.6 1996/08/20 19:53:10 stewart Exp $";
3838
#include "sparse2.h"
3939

4040

41-
#ifdef MALLOCDECL
42-
#include <malloc.h>
43-
#endif
41+
#include "machine.h"
4442

4543
#define alpha 0.6403882032022076 /* = (1+sqrt(17))/8 */
4644

0 commit comments

Comments
 (0)