• R/O
  • HTTP
  • SSH
  • HTTPS

libtetrabz: コミット

テトラへドロン法ライブラリ


コミットメタ情報

リビジョン574fcea20c2a95cf1ed770f28e126d756e0aba67 (tree)
日時2017-07-06 15:52:24
作者mitsuaki1987 <kawamitsuaki@gmai...>
コミッターmitsuaki1987

ログメッセージ

Add Autoconf files

変更サマリ

差分

--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,5 @@
1+ACLOCAL_AMFLAGS = -I config/m4
2+
3+SUBDIRS = src test example
4+
5+MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,65 @@
1+# -*- Autoconf -*-
2+# Process this file with autoconf to produce a configure script.
3+
4+AC_PREREQ([2.69])
5+AC_INIT([libtetrabz], [2.0.0], [mkawamura@issp.u-tokyo.ac.jp])
6+AC_CONFIG_AUX_DIR([config])
7+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
8+AC_CONFIG_HEADERS([config.h])
9+
10+echo ""
11+echo " Check compiler"
12+echo ""
13+AC_PROG_CC
14+AC_PROG_F77
15+AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi],
16+ [compile with MPI (parallelization) support.
17+ If none is found, MPI is not used. Default: no])],,
18+ [with_mpi=no])
19+if test x"$with_mpi" != xno; then
20+ AX_PROG_FC_MPI(,[FCFLAGS="$FCFLAGS -D__MPI"],[
21+ AC_MSG_FAILURE([MPI compiler requested, but couldn't use MPI.])
22+ ])
23+else
24+ AC_PROG_FC
25+fi
26+echo ""
27+echo " Check OpenMP"
28+echo ""
29+AC_ARG_WITH(openmp, [AS_HELP_STRING([--with-openmp],
30+ [compile with OpenMP (parallelization) support.
31+ If none is found, OpenMP is not used. Default: yes])],,
32+ [with_openmp=yes])
33+if test x"$with_openmp" != xno; then
34+ AX_OPENMP([FCFLAGS="$FCFLAGS $OPENMP_CFLAGS";CFLAGS="$CFLAGS $OPENMP_CFLAGS"],[
35+ AC_MSG_WARN([OpenMP requested, but couldn't use OpenMP.])
36+ ])
37+fi
38+echo ""
39+echo " Check library generation"
40+echo ""
41+AM_PROG_AR
42+AC_PROG_LIBTOOL
43+#
44+echo ""
45+echo " Output files"
46+echo ""
47+AC_CONFIG_FILES([
48+Makefile
49+src/Makefile
50+test/Makefile
51+example/Makefile
52+])
53+
54+AC_OUTPUT
55+
56+echo ""
57+echo " SUMMARY"
58+echo ""
59+echo " FC = ${FC}"
60+echo " CC = ${CC}"
61+echo " FCFLAGS = ${FCFLAGS}"
62+echo " CFLAGS = ${CFLAGS}"
63+echo ""
64+echo " Configure done."
65+echo ""
--- a/doc/en/libtetrabz_install_en.rst
+++ b/doc/en/libtetrabz_install_en.rst
@@ -112,7 +112,7 @@ They can be specified at once. E.g.
112112
113113 .. code-block:: bash
114114
115- $ ./configure --prefix=/home/komega/ --with-mpi=yes FC=mpif90
115+ $ ./configure --prefix=/home/libtetrabz/ --with-mpi=yes FC=mpif90
116116
117117 All options and variables have default values.
118118 We show a part of them as follows:
--- /dev/null
+++ b/example/Makefile.am
@@ -0,0 +1,13 @@
1+MAINTAINERCLEANFILES = Makefile.in
2+
3+bin_PROGRAMS = dos.x lindhard.x dos_c.x
4+
5+dos_x_SOURCES = dos.F90
6+lindhard_x_SOURCES = dos.F90
7+dos_c_x_SOURCES = dos.cF90
8+
9+AM_FCFLAGS = -I$(top_builddir) -I$(top_builddir)/src
10+AM_CFLAGS = -I$(top_builddir) -I$(top_builddir)/src
11+dos_x_LDADD = -L$(top_builddir)/src -ltetrabz $(LAPACK_LIBS) $(BLAS_LIBS)
12+lindhard_x_LDADD = -L$(top_builddir)/src -ltetrabz $(LAPACK_LIBS) $(BLAS_LIBS)
13+dos_c_x_LDADD = -L$(top_builddir)/src -ltetrabz $(LAPACK_LIBS) $(BLAS_LIBS)
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,16 @@
1+MAINTAINERCLEANFILES = Makefile.in
2+
3+include_HEADERS = libtetrabz.h libtetrabz.mod
4+lib_LTLIBRARIES = libtetrabz.la
5+
6+libtetrabz_la_SOURCES = libtetrabz.F90
7+
8+libtetrabz.o : libtetrabz.F90 libtetrabz_polcmplx_mod.o libtetrabz_fermigr_mod.o libtetrabz_polstat_mod.o libtetrabz_dbldelta_mod.o libtetrabz_dblstep_mod.o libtetrabz_dos_mod.o libtetrabz_occ_mod.o
9+libtetrabz_common.o : libtetrabz_common.F90
10+libtetrabz_dbldelta_mod.o : libtetrabz_dbldelta_mod.F90 libtetrabz_common.o
11+libtetrabz_dblstep_mod.o : libtetrabz_dblstep_mod.F90 libtetrabz_common.o
12+libtetrabz_dos_mod.o : libtetrabz_dos_mod.F90 libtetrabz_common.o
13+libtetrabz_fermigr_mod.o : libtetrabz_fermigr_mod.F90 libtetrabz_common.o
14+libtetrabz_occ_mod.o : libtetrabz_occ_mod.F90 libtetrabz_common.o
15+libtetrabz_polcmplx_mod.o : libtetrabz_polcmplx_mod.F90 libtetrabz_common.o
16+libtetrabz_polstat_mod.o : libtetrabz_polstat_mod.F90 libtetrabz_common.o
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,7 @@
1+MAINTAINERCLEANFILES = Makefile.in
2+noinst_PROGRAMS = test.x
3+
4+test_x_SOURCES = test.F90
5+
6+AM_FCFLAGS = -I$(top_builddir) -I$(top_builddir)/src
7+test_x_LDADD = -L$(top_builddir)/src -ltetrabz
旧リポジトリブラウザで表示