--- a/configure.in +++ b/configure.in @@ -44,14 +44,15 @@ # and has a different meaning for keyword "complex"! Drew Parsons, 2001. ##AC_HEADER_CHECK(complex.h, AC_DEFINE(HAVE_COMPLEX_H),) AC_HEADER_CHECK(malloc.h, AC_DEFINE(HAVE_MALLOC_H),) +AC_HEADER_CHECK(huge_val.h, AC_DEFINE(HAVE_HUGE_VAL_H),) AC_HEADER_CHECK(varargs.h, AC_DEFINE(VARARGS),) AC_DEFINE(NOT_SEGMENTED) AC_SIZE_T AC_CONST AC_WORDS_BIGENDIAN -AC_WITH(complex, AC_DEFINE(COMPLEX)) +AC_WITH(complex, AC_DEFINE(MESCHACH_COMPLEX)) AC_WITH(sparse, AC_DEFINE(SPARSE)) -AC_WITH(all, AC_DEFINE(COMPLEX)) +AC_WITH(all, AC_DEFINE(MESCHACH_COMPLEX)) AC_WITH(all, AC_DEFINE(SPARSE)) AC_WITH(unroll, AC_DEFINE(VUNROLL)) AC_WITH(munroll, AC_DEFINE(MUNROLL)) --- a/makefile.in +++ b/makefile.in @@ -18,8 +18,7 @@ LIBS = @LIBS@ RANLIB = @RANLIB@ - -CFLAGS = -O3 -fPIC +CFLAGS += -fPIC .c.o: @@ -68,7 +67,7 @@ # Different configurations # the dependencies **between** the parts are for dmake -all: shared static +all: shared #all: @PROGS@ part1 part2 part3 zpart1 zpart2 shared part2: part1 part3: part2 @@ -77,50 +76,10 @@ zpart2: zpart1 complex: part1 part2 zpart1 zpart2 +shared: libmeschach.so -$(LIST1): $(HBASE) -part1: $(LIST1) - ar ru libmeschach.a $(LIST1) - $(RANLIB) libmeschach.a -# $(CC) -shared -o libmeschach.so $(LIST1) - -$(LIST2): $(HBASE) matrix2.h -part2: $(LIST2) - ar ru libmeschach.a $(LIST2) - $(RANLIB) libmeschach.a -# $(CC) -shared -o libmeschach.so $(LIST2) - -$(LIST3): $(HBASE) sparse.h sparse2.h -part3: $(LIST3) - ar ru libmeschach.a $(LIST3) - $(RANLIB) libmeschach.a -# $(CC) -shared -o libmeschach.so $(LIST3) - -$(ZLIST1): $(HBASDE) zmatrix.h -zpart1: $(ZLIST1) - ar ru libmeschach.a $(ZLIST1) - $(RANLIB) libmeschach.a -# $(CC) -shared -o libmeschach.so $(ZLIST1) - -$(ZLIST2): $(HBASE) zmatrix.h zmatrix2.h -zpart2: $(ZLIST2) - ar ru libmeschach.a $(ZLIST2) - $(RANLIB) libmeschach.a -# $(CC) -shared -o libmeschach.so $(ZLIST2) - -$(OLDLIST): $(HBASE) sparse.h sparse2.h -oldpart: $(OLDLIST) - ar ru libmeschach.a $(OLDLIST) - $(RANLIB) libmeschach.a -# $(CC) -shared -o libmeschach.so $(OLDLIST) - -shared: $(ALL_LISTS) - $(CC) -shared -o libmeschach.so $(ALL_LISTS) -lc -lm -Wl,-soname -Wl,libmeschach.so.$(vers) - -static: $(ALL_LISTS) - ar ru libmeschach.a $(ALL_LISTS) - $(RANLIB) libmeschach.a - +libmeschach.so: $(ALL_LISTS) + $(CC) $(LDFLAGS) -shared -o libmeschach.so $(ALL_LISTS) -lc -lm -Wl,-soname -Wl,libmeschach.so.$(vers) ####################################### @@ -199,32 +158,32 @@ alltorture: torture sptort ztorture memtort itertort mfuntort iotort -torture:torture.o libmeschach.a - $(CC) $(CFLAGS) $(DEFS) -o torture torture.o \ - libmeschach.a $(LIBS) -sptort:sptort.o libmeschach.a - $(CC) $(CFLAGS) $(DEFS) -o sptort sptort.o \ - libmeschach.a $(LIBS) -memtort: memtort.o libmeschach.a - $(CC) $(CFLAGS) $(DEFS) -o memtort memtort.o \ - libmeschach.a $(LIBS) -ztorture:ztorture.o libmeschach.a - $(CC) $(CFLAGS) $(DEFS) -o ztorture ztorture.o \ - libmeschach.a $(LIBS) -itertort: itertort.o libmeschach.a - $(CC) $(CFLAGS) $(DEFS) -o itertort itertort.o \ - libmeschach.a $(LIBS) - -iotort: iotort.o libmeschach.a - $(CC) $(CFLAGS) $(DEFS) -o iotort iotort.o \ - libmeschach.a $(LIBS) -mfuntort: mfuntort.o libmeschach.a - $(CC) $(CFLAGS) $(DEFS) -o mfuntort mfuntort.o \ - libmeschach.a $(LIBS) -tstmove: tstmove.o libmeschach.a - $(CC) $(CFLAGS) $(DEFS) -o tstmove tstmove.o \ - libmeschach.a $(LIBS) -tstpxvec: tstpxvec.o libmeschach.a - $(CC) $(CFLAGS) $(DEFS) -o tstpxvec tstpxvec.o \ - libmeschach.a $(LIBS) +torture:torture.o libmeschach.so + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -fPIE -o torture torture.o \ + -lmeschach -L. $(LIBS) +sptort:sptort.o libmeschach.so + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -fPIE -o sptort sptort.o \ + -lmeschach -L. $(LIBS) +memtort: memtort.o libmeschach.so + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -fPIE -o memtort memtort.o \ + -lmeschach -L. $(LIBS) +ztorture:ztorture.o libmeschach.so + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -fPIE -o ztorture ztorture.o \ + -lmeschach -L. $(LIBS) +itertort: itertort.o libmeschach.so + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -fPIE -o itertort itertort.o \ + -lmeschach -L. $(LIBS) + +iotort: iotort.o libmeschach.so + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -fPIE -o iotort iotort.o \ + -lmeschach -L. $(LIBS) +mfuntort: mfuntort.o libmeschach.so + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -fPIE -o mfuntort mfuntort.o \ + -lmeschach -L. $(LIBS) +tstmove: tstmove.o libmeschach.so + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -fPIE -o tstmove tstmove.o \ + -lmeschach -L. $(LIBS) +tstpxvec: tstpxvec.o libmeschach.so + $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -fPIE -o tstpxvec tstpxvec.o \ + -lmeschach -L. $(LIBS)