]> www.ginac.de Git - cln.git/commitdiff
build: compile benchmark programs too.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Tue, 26 Aug 2008 16:59:31 +0000 (20:59 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Wed, 27 Aug 2008 04:41:09 +0000 (08:41 +0400)
Makefile.am
benchmarks/Makefile.am [new file with mode: 0644]
benchmarks/Makefile.in [deleted file]
benchmarks/timebench1.cc
configure.ac

index abca0df659702b9bfe49d813540c81448670c5d0..092cec35f84e0422de53050366e307170e7f64fe 100644 (file)
@@ -1,5 +1,5 @@
-SUBDIRS = src tests examples doc
-DIST_SUBDIRS = src tests examples doc
+SUBDIRS = src tests examples doc benchmarks
+DIST_SUBDIRS = src tests examples doc benchmarks
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = cln.pc
diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am
new file mode 100644 (file)
index 0000000..a93dd14
--- /dev/null
@@ -0,0 +1,18 @@
+noinst_PROGRAMS = timebench1 timebench2a timebench2ap timebench2b
+
+timebench1_SOURCES = timebench1.cc
+timebench1_LDADD = ../src/libcln.la
+
+timebench2a_SOURCES = timebench2a.cc
+timebench2a_LDADD = ../src/libcln.la
+
+timebench2ap_SOURCES = timebench2ap.cc
+timebench2ap_LDADD = ../src/libcln.la
+
+timebench2b_SOURCES = timebench2b.cc
+timebench2b_LDADD = ../src/libcln.la
+
+AM_CPPFLAGS = -I../include -I$(top_srcdir)/include
+
+EXTRA_DIST = README bench2.txt timebench2.sh
+
diff --git a/benchmarks/Makefile.in b/benchmarks/Makefile.in
deleted file mode 100644 (file)
index 296aa00..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-# Makefile for cln/benchmarks
-
-#### Start of system configuration section. ####
-
-# Directories used by "make":
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-
-# Programs used by "make":
-# C compiler
-CC = @CC@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-# C++ compiler
-CXX = @CXX@
-CXXFLAGS = @CXXFLAGS@
-CXXCPP = @CXXCPP@
-INCLUDES = -I../include -I${top_srcdir}/include -I${top_srcdir}/src -I${srcdir}
-override CPPFLAGS += ${INCLUDES}
-LIBTOOL = @LIBTOOL@
-LIBTOOL_LINK = ${LIBTOOL} --mode=link
-MV = mv
-LN = ln
-RM = rm -f
-@SET_MAKE@
-EXEEXT = @EXEEXT@
-
-#### End of system configuration section. ####
-
-SHELL = /bin/sh
-
-# Needed by ${LIBTOOL}.
-top_builddir = ..
-
-VPATH = ${srcdir}
-
-FILES_CC := $(notdir $(wildcard ${srcdir}/*.cc))
-FILES_CC := $(filter-out %.i.cc, ${FILES_CC})
-
-FILES_I_CC := $(patsubst %.cc,%.i.cc,${FILES_CC})
-
-FILES_S := $(patsubst %.cc,%.s,${FILES_CC})
-
-FILES_O := $(patsubst %.cc,%.o,${FILES_CC})
-
-OBJECTS = ${FILES_O}
-
-LIBS = ../src/libcln.la -lm
-LIBDEPS = ../src/libcln.la
-
-PROGRAMS = $(addsuffix ${EXEEXT},timebench1 timebench2a timebench2ap timebench2b)
-MODULES_timebench1 = timebench1
-MODULES_timebench2a = timebench2a
-MODULES_timebench2ap = timebench2ap
-MODULES_timebench2b = timebench2b
-
-all : $(addsuffix ${EXEEXT}, timebench2a timebench2ap timebench2b)
-
-%.s : %.c
-       ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
-
-%.s : %.cc
-       ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -S $< -o $@
-
-ifdef notyet
-
-%.o : %.c
-       ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $< -o $@
-
-%.o : %.cc
-       ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $< -o $@
-
-else
-
-${FILES_O} : %.o : %.s
-       ${CC} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c $< -o $@
-
-endif
-
-%.i : %.c
-       ${CPP} ${CFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
-
-%.i.cc : %.cc
-       ${CXXCPP} ${CXXFLAGS} ${CPPFLAGS} ${TARGET_ARCH} $< > $@
-
-timebench1${EXEEXT} : $(patsubst %,%.o,${MODULES_timebench1})
-timebench2a${EXEEXT} : $(patsubst %,%.o,${MODULES_timebench2a})
-timebench2ap${EXEEXT} : $(patsubst %,%.o,${MODULES_timebench2ap})
-timebench2b${EXEEXT} : $(patsubst %,%.o,${MODULES_timebench2b})
-${PROGRAMS} : %${EXEEXT} : ${LIBDEPS}
-       ${LIBTOOL_LINK} ${CXX} ${CXXFLAGS} ${TARGET_ARCH} $(patsubst %,%.o,$(MODULES_$(*F))) ${LDFLAGS} ${LIBS} -o $@
-
-
-install : all
-
-installdirs :
-
-uninstall :
-
-check : all
-
-mostlyclean : clean
-
-clean : force
-       ${RM} *.s *.o *.a ${PROGRAMS} a.out core
-       ${RM} -r .libs _libs
-
-distclean : clean
-       ${RM} config.status config.log config.cache Makefile
-
-maintainer-clean : distclean
-
-force :
index a626bf3f9da091d0df5c0cc10d09cad79a0bed5f..46482a93c0d8b8babfd8f19e11eb41bdeb02e6db 100644 (file)
@@ -12,6 +12,9 @@
 #include <cstdlib>
 #include <cstring>
 #include <cln/timing.h>
+#include <iostream>
+using namespace cln;
+using namespace std;
 
 // Timings on Linux i486 33 MHz, 1000 decimal places = 104 32-bit words.
 // Function              LiDIA       Pari       CLISP         CLN
index 2636046840ca7fda3968f3040ed0b0854d4dfecd..21740d925049126f6027249ef26514555e92c67a 100644 (file)
@@ -135,4 +135,4 @@ CL_LIBGMP
 dnl
 dnl           That's it.
 dnl
-AC_OUTPUT([Makefile src/Makefile tests/Makefile examples/Makefile doc/Makefile cln.spec cln.pc])
+AC_OUTPUT([Makefile src/Makefile tests/Makefile examples/Makefile doc/Makefile benchmarks/Makefile cln.spec cln.pc])