Skip to content

Commit

Permalink
starting to add fortran build
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Mar 19, 2019
1 parent dcc8bd4 commit badb9e2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ AC_CONFIG_MACRO_DIR([m4])
# Find and learn about the C compiler.
AC_PROG_CC

# Find and learn about the Fortran compiler.
AC_PROG_FC

# Libtool initialisation.
AC_PROG_LIBTOOL

Expand Down Expand Up @@ -111,6 +114,7 @@ AC_CONFIG_HEADERS([config.h])
AC_OUTPUT(Makefile
src/Makefile
src/clib/Makefile
src/flib/Makefile
tests/Makefile
tests/cunit/Makefile
examples/Makefile
Expand Down
7 changes: 6 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@

# Ed Hartnett

SUBDIRS = clib
# Does the user want to build fortran?
if BUILD_FORTRAN
FLIB = flib
endif

SUBDIRS = clib $(FLIB)
26 changes: 26 additions & 0 deletions src/flib/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## This is the automake file to build the PIO Fortran library.
# Ed Hartnett 3/19/19

# The library we are building.
#lib_LTLIBRARIES = libpiof.la

# These linker flags specify libtool version info.
# See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
# for information regarding incrementing `-version-info`.
#libpiof_la_LDFLAGS = -version-info 1:0:0

# The library soure files.
#libpiof_la_SOURCES = pio.F90

# Build this uninstalled convenience library.
noinst_LTLIBRARIES = libpio_kinds.la

# The convenience library depends on its source.
libpio_kinds_la_SOURCES = pio_kinds.F90

# Mod file depends on its o file, is built and then installed.
pio_kinds.mod: pio_kinds.$(OBJEXT)
BUILT_SOURCES = pio_kinds.mod
include_HEADERS = pio_kinds.mod

CLEANFILES = *.mod

0 comments on commit badb9e2

Please sign in to comment.