Skip to content

Commit

Permalink
First working build based on autotools
Browse files Browse the repository at this point in the history
  • Loading branch information
Ithanil committed Jul 6, 2018
1 parent 1ac5a5f commit 9714337
Show file tree
Hide file tree
Showing 30 changed files with 222 additions and 7 deletions.
55 changes: 54 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,68 @@ xcuserdata
DerivedData
*.xcuserstate

# -- Automake files (http://www.gnu.org/software/automake)

Makefile
Makefile.in
.dirstamp
/ar-lib
/mdate-sh
/py-compile
/test-driver
/ylwrap

# --- Autoconf files (http://www.gnu.org/software/autoconf)

config.h
config.h.in
config.log
config.status
.deps
autom4te.cache
/autoscan.log
/autoscan-*.log
/aclocal.m4
/compile
/config.guess
/config.h.in
/config.sub
/configure
/configure.scan
/depcomp
/install-sh
/missing
/stamp-h1

# --- Files added by autoreconf -i

/ltmain.sh
COPYING
INSTALL

# --- Texinfo files (http://www.gnu.org/software/texinfo)

/texinfo.tex

# --- M4 files (http://www.gnu.org/software/m4)

m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4

# -- project specific ignores --
lib*
config.sh
**/exe
exe
vgcore*
*.o
*.dSYM
*.swp
*.swo
*.gcno
*.lo

test/*.txt
test/ut*/run_single_unittest.sh
Expand Down
10 changes: 10 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This neural network library was originally created in 2017-2018 by Francesco Calcavecchia,
while working in a postdoctoral position for the Dynamic of Condensed Matter group,
led by Prof. Dr. Thomas D. Kühne at Paderborn University (Germany).
In early 2018, Jan Kessler (from the same research group) began contributing and became
the main developer and administrator in mid 2018.

Here we maintain a list of people who significantly contributed to the project, by any means:

Jan Kessler (Ithanil)
Francesco Calcavecchia (francesco086)
5 changes: 5 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = bin
#SUBDIRS = bin test benchmark examples doc
1 change: 1 addition & 0 deletions benchmark/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBDIRS = common bench_actfs_derivs bench_actfs_ffprop
2 changes: 2 additions & 0 deletions benchmark/bench_actfs_derivs/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = ../common/Timer.cpp ../common/FFNNBenchmarks.cpp main.cpp
2 changes: 2 additions & 0 deletions benchmark/bench_actfs_ffprop/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = ../common/Timer.cpp ../common/FFNNBenchmarks.cpp main.cpp
91 changes: 91 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([DCM-FFNN], [0.3], [[email protected]])
: ${CXXFLAGS=""}
#AC_CONFIG_SRCDIR([include/InputUnit.hpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
LT_INIT

# Checks for programs.
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_LN_S

# Checks for libraries.

# Checks for header files.

AC_CHECK_HEADERS([gsl/gsl_vector.h gsl/gsl_matrix.h gsl/gsl_blas.h gsl/gsl_multifit_nlinear.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T

# Checks for library functions.
AC_CHECK_FUNCS([pow sqrt])

# Add debug support
AC_ARG_ENABLE(debug,
AS_HELP_STRING(
[--enable-debug],
[enable debugging, default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
AM_COND_IF(DEBUG,
AC_DEFINE(DEBUG, 1, [Define to 0 if this is a release build]),
AC_DEFINE(DEBUG, 0, [Define to 1 or higher if this is a debug build]))


# Add debug support
AC_ARG_ENABLE(coverage,
AS_HELP_STRING(
[--enable-coverage],
[enable coverage, default: no]),
[case "${enableval}" in
yes) coverage=true ;;
no) coverage=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-coverage]) ;;
esac],
[debug=false])
AM_CONDITIONAL(COVERAGE, test x"$coverage" = x"true")
AM_COND_IF(COVERAGE,
AC_DEFINE(COVERAGE, 1, [Define to 0 if you don't need code coverage statistics.]),
AC_DEFINE(COVERAGE, 0, [Define to 1 or higher if you want to generate code coverage statistics.]))

AC_CONFIG_FILES([Makefile
benchmark/Makefile
benchmark/bench_actfs_derivs/Makefile
benchmark/bench_actfs_ffprop/Makefile
bin/Makefile
doc/Makefile
examples/Makefile
examples/ex1/Makefile
examples/ex2/Makefile
examples/ex3/Makefile
examples/ex4/Makefile
examples/ex5/Makefile
examples/ex6/Makefile
examples/ex7/Makefile
examples/ex8/Makefile
examples/ex9/Makefile
test/Makefile
test/ut1/Makefile
test/ut2/Makefile
test/ut3/Makefile
test/ut4/Makefile
test/ut5/Makefile
test/ut6/Makefile
test/ut7/Makefile
test/ut8/Makefile
test/ut9/Makefile])
AM_INIT_AUTOMAKE([subdir-objects])
AC_OUTPUT
1 change: 1 addition & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBDIRS = doxygen
1 change: 1 addition & 0 deletions examples/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SUBDIRS = ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9
2 changes: 2 additions & 0 deletions examples/ex1/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions examples/ex2/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions examples/ex3/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions examples/ex4/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions examples/ex5/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions examples/ex6/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions examples/ex7/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions examples/ex8/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions examples/ex9/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
6 changes: 0 additions & 6 deletions script/link_headers.sh

This file was deleted.

15 changes: 15 additions & 0 deletions script/update_file_lists.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

cd include
rm *.hpp # remove old links
ln -sf ../src/*/*.hpp ./ # make new links to all header files in src
cd ..

cd bin
echo "libffnn_la_HEADERS = \\" > headers.am
find ../src/ -name *.hpp | tr '\n' ' ' >> headers.am

echo "libffnn_la_SOURCES = \\" > sources.am
find ../src/ -name *.cpp | tr '\n' ' ' >> sources.am

cd ..
4 changes: 4 additions & 0 deletions test/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp

SUBDIRS = ut1 ut2 ut3 ut4 ut5 ut6 ut7 ut8 ut9
2 changes: 2 additions & 0 deletions test/ut1/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions test/ut2/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions test/ut3/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions test/ut4/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions test/ut5/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions test/ut6/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions test/ut7/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions test/ut8/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp
2 changes: 2 additions & 0 deletions test/ut9/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin_PROGRAMS = exe
exe_SOURCES = main.cpp

0 comments on commit 9714337

Please sign in to comment.