Commit 9140238f authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Set up file structure to use autoconf

parent d4d538a0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -6,5 +6,15 @@ build/trapping/*
build/libnptm/*
containers/singularity/*.sif
doc/build/*
src/aclocal.m4
src/autom4te.cache
src/config.*
src/configure
src/configure~
src/libtool
src/m4
src/Makefile
src/Makefile.in
src/*/.deps
src/*/objects/*
src/*/dynobjects/*

src/Makefile.am

0 → 100644
+16 −0
Original line number Diff line number Diff line
AUTOMAKE_OPTIONS=subdir-objects
lib_LTLIBRARIES=libnptm.la
libnptm_la_SOURCES=libnptm/algebraic.cpp libnptm/clu_subs.cpp libnptm/Commons.cpp libnptm/Configuration.cpp libnptm/file_io.cpp libnptm/lapack_calls.cpp libnptm/logging.cpp libnptm/magma_calls.cpp libnptm/Parsers.cpp libnptm/sph_subs.cpp libnptm/tfrfme.cpp libnptm/TransitionMatrix.cpp libnptm/tra_subs.cpp libnptm/types.cpp
bin_PROGRAMS=edfb_clu clu np_cluster edfb_sph sph np_sphere frfme lffft np_trapping
edfb_clu_SOURCES=cluster/edfb_clu.f
clu_SOURCES=cluster/clu.f
np_cluster_SOURCES=cluster/np_cluster.cpp cluster/cluster.cpp
edfb_sph_SOURCES=sphere/edfb_sph.f
sph_SOURCES=sphere/sph.f
np_sphere_SOURCES=sphere/np_sphere.cpp sphere/sphere.cpp
frfme_SOURCES=trapping/frfme.f
lffft_SOURCES=trapping/lffft.f
np_trapping_SOURCES=trapping/np_trapping.cpp trapping/cfrfme.cpp trapping/clffft.cpp
check_PROGRAMS=test_TEDF test_TTMS
test_TEDF_SOURCES=testing/test_TEDF.cpp
test_TTMS_SOURCES=testing/test_TTMS.cpp

src/configure.ac

0 → 100644
+46 −0
Original line number Diff line number Diff line
# CAPABILITY TESTING MACROS

# END CAPABILITY TESTING MACROS

# autoconf setup initialization
AC_INIT([np_tmcode], [8.04], [giovanni.lamura@inaf.it])

# Folder structure safety check
AC_CONFIG_SRCDIR([libnptm/TransitionMatrix.cpp])

# Auxiliary build folder
AC_CONFIG_AUX_DIR([../build/aux])

# automake initialization
AM_INIT_AUTOMAKE([-Wall -Werror foreign])

# Compiler detection
AM_PROG_AR
AC_PROG_F77([mpif90 gfortran f77])
AC_PROG_CXX([mpicxx g++ clang])

# Libtool initialization
LT_INIT

# Environment setup
FFLAGS="-std=legacy -O3"
CXXFLAGS="-O3 -ggdb -Wno-format-contains-nul"
SUBDIRS="cluster libnptm sphere testing trapping"
AS_IF(
	[test "x$HDF5_INCLUDE" = "x"],
	[export HDF5_INCLUDE=/usr/include/hdf5/serial],
	[AC_MSG_NOTICE(["HDF5_INCLUDE=$HDF5_INCLUDE"])]
)

# Check for required headers
AC_CHECK_HEADER(
	[$HDF5_INCLUDE/hdf5.h],
	,
	AC_MSG_ERROR(["Could not find HDF5 headers!]),
	)

# Send output to Makefiles
AC_CONFIG_FILES([Makefile])

# Generate the output
AC_OUTPUT