Commit f17f1d02 authored by gsell's avatar gsell
Browse files

fixes for building outside source tree

parent 78078c32
......@@ -4,8 +4,6 @@ AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
BUILD_LIBS='libH5hut'
ENABLE_DEBUG='no'
ENABLE_C='yes'
ENABLE_FORTRAN='no'
......@@ -211,9 +209,6 @@ AC_MSG_CHECKING([if C interface enabled])
if test "X$ENABLE_C" = "Xyes"; then
AC_MSG_RESULT([yes])
BINDINGS="$BINDINGS C"
BUILD_LIBS="$BUILD_LIBS"
BUILD_TESTS="$BUILD_TESTS h5u_test h5b_test"
BUILD_TOOLS="$BUILD_TOOLS h5hutcc"
else
AC_MSG_RESULT([no])
fi
......@@ -224,7 +219,6 @@ if test "X$ENABLE_FORTRAN" = "Xyes"; then
AC_MSG_RESULT([yes])
BINDINGS="$BINDINGS Fortran"
LIB_FORTRAN="libH5hutF.la"
BUILD_LIBS="$BUILD_LIBS libH5hutF"
if test "X$ENABLE_PARALLEL" = "Xyes"; then
AC_PROG_FC(mpif90 mpif77)
......@@ -284,7 +278,7 @@ if test "X$ENABLE_PARALLEL" = "Xyes"; then
AC_MSG_CHECKING([for ParMETIS])
if test "X$PARMETISPATH" != "X"; then
AM_CPPFLAGS="$AM_CPPFLAGS -I$PARMETISPATH/include"
LDFLAGS="$LDFLAGS -L$PARMETISPATH/lib"
AM_LDFLAGS="$AM_LDFLAGS -L$PARMETISPATH/lib"
fi
LIBS="$LIBS -lparmetis -lmetis"
......@@ -305,7 +299,7 @@ fi
# LIBRARY PATHS
if test -n "${HDF5_PREFIX}" ; then
AM_CPPFLAGS="$AM_CPPFLAGS -I$HDF5_PREFIX/include"
LDFLAGS="$LDFLAGS -L$HDF5_PREFIX/lib"
AM_LDFLAGS="$AM_LDFLAGS -L$HDF5_PREFIX/lib"
fi
AC_CHECK_LIB([z], [compress2])
AC_CHECK_LIB([hdf5], [H5open])
......@@ -337,7 +331,7 @@ if test -z "$LUSTREROOT"; then
else
CFLAGS="$CFLAGS -DH5_USE_LUSTRE"
AM_CPPFLAGS="$AM_CPPFLAGS -I$LUSTREROOT/usr/include"
LDFLAGS="$LDFLAGS -L$LUSTREROOT/usr/lib"
AM_LDFLAGS="$AM_LDFLAGS -L$LUSTREROOT/usr/lib"
LIBS="$LIBS -llustreapi"
fi
......@@ -360,13 +354,11 @@ AC_SUBST(LUSTREROOT)
AC_SUBST(CFLAGS)
AC_SUBST(FFLAGS)
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(AM_LDFLAGS)
AC_SUBST(LIBS)
AC_SUBST(UNDERSCORE_H)
AC_SUBST(LIB_FORTRAN)
AC_SUBST(BINDINGS)
AC_SUBST(BUILD_TESTS)
AC_SUBST(BUILD_TOOLS)
AC_CONFIG_FILES([
Makefile
......@@ -396,16 +388,13 @@ AC_MSG_RESULT([ ])
AC_MSG_RESULT([Host OS: $host_os])
AC_MSG_RESULT([Host CPU: $host_cpu])
AC_MSG_RESULT([Host vendor: $host_vendor])
AC_MSG_RESULT([Build libraries: $BUILD_LIBS])
AC_MSG_RESULT([Build test programs: $BUILD_TESTS])
AC_MSG_RESULT([Build tools: $BUILD_TOOLS])
AC_MSG_RESULT([CC = $CC])
AC_MSG_RESULT([CXX = $CXX])
AC_MSG_RESULT([FC = $FC])
AC_MSG_RESULT([CFLAGS = $CFLAGS])
AC_MSG_RESULT([FFLAGS = $FFLAGS])
AC_MSG_RESULT([AM_CPPFLAGS = $AM_CPPFLAGS])
AC_MSG_RESULT([LDFLAGS = $LDFLAGS])
AC_MSG_RESULT([AM_LDFLAGS = $AM_LDFLAGS])
AC_MSG_RESULT([LIBS = $LIBS])
AC_MSG_RESULT([HDF5_PREFIX = $HDF5_PREFIX])
AC_MSG_RESULT([LUSTREROOT = $LUSTREROOT])
......
AM_CPPFLAGS += -I${abs_top_builddir}/src/include
FFLAGS += -cpp $(AM_CPPFLAGS)
LDFLAGS += -L${abs_top_builddir}/src/lib
AM_LDFLAGS += -L${abs_top_builddir}/src/lib
LDADD =
......
AM_CPPFLAGS += -I${abs_top_builddir}/src/include
FFLAGS += -cpp $(AM_CPPFLAGS)
LDFLAGS += -L${abs_top_builddir}/src/lib
AM_LDFLAGS += -L${abs_top_builddir}/src/lib
LDADD =
if ENABLE_C
LDADD +=
endif
if ENABLE_FORTRAN
LDADD += -lH5hutF
endif
......@@ -17,19 +13,21 @@ LDADD += -lH5hut
noinst_PROGRAMS =
if ENABLE_C
noinst_PROGRAMS += read_write
noinst_PROGRAMS += \
fields \
read_write
endif
if ENABLE_FORTRAN
noinst_PROGRAMS += H5BlockExampleF
endif
fields_SOURCES = fields.c
read_write_SOURCES = read_write.c
H5BlockExampleF_SOURCES = H5BlockExampleF.f90
%.o : %.f90
$(FC) $(FFLAGS) -c $<
distclean-local:
$(RM) *~
# test level Makefile.am
AM_CPPFLAGS += -I${abs_top_builddir}/src/include
FFLAGS += -cpp $(AM_CPPFLAGS)
AM_LDFLAGS += -L${abs_top_builddir}/src/lib
OBJEXT = o
LDADD =
AM_LDFLAGS = -L../../src/lib @LDFLAGS@
LIBS = -lH5hut @LIBS@
AM_CPPFLAGS = -I../../src/include @AM_CPPFLAGS@
if ENABLE_FORTRAN
LDADD += -lH5hutF
endif
LDADD += -lH5hut
noinst_PROGRAMS = \
tetmesh_write \
......
AM_CPPFLAGS += -I${abs_top_builddir}/src/include
FFLAGS += -cpp $(AM_CPPFLAGS)
LDFLAGS += -L${abs_top_builddir}/src/lib
AM_LDFLAGS += -L${abs_top_builddir}/src/lib
LDADD =
......@@ -21,6 +21,7 @@ noinst_PROGRAMS += \
Bench \
H5test \
core_vfd \
particles \
read_canonicalview \
write_setnumparticles \
write_setview
......@@ -35,6 +36,7 @@ EXTRA_PROGRAMS = Bench H5test H5testF
Bench_SOURCES = Bench.c
H5test_SOURCES = H5test.c
core_vfd_SOURCES = core_vfd.c
particles_SOURCES = particles.c
read_canonicalview_SOURCES = read_canonicalview.c
write_setnumparticles_SOURCES = write_setnumparticles.c
write_setview_SOURCES = write_setview.c
......
......@@ -2,7 +2,7 @@
OBJEXT=o
AM_CPPFLAGS = -I../include @AM_CPPFLAGS@
AM_CPPFLAGS = -I$(top_srcdir)/src/include @AM_CPPFLAGS@
EXTRA_HEADERS = \
h5_attribs_private.h \
......@@ -103,6 +103,7 @@ libH5hut_la_DEPENDENCIES = $(EXTRA_HEADERS)
libH5hut_la_LDFLAGS = -version-info 2:0:0
all-local:
$(INSTALL) -m755 -d ../lib
$(INSTALL) -m644 .libs/libH5hut.a ../lib
install-exec-local:
......
# test level Makefile.am
AM_CPPFLAGS = -I$(top_srcdir)/src/include @AM_CPPFLAGS@
AM_LDFLAGS += -L${abs_top_builddir}/src/lib
OBJEXT=o
LDADD =
LDADD += -lH5hut
AM_CPPFLAGS = -I../src/include @AM_CPPFLAGS@
noinst_PROGRAMS =
LDADD = \
../src/lib/libH5hut.a
noinst_PROGRAMS = @BUILD_TESTS@
if ENABLE_C
noinst_PROGRAMS += h5u_test h5b_test h5_attach_test
endif
TESTS_ENVIRONMENT = env LD_LIBRARY_PATH=@HDF5_PREFIX@/lib:$(LD_LIBRARY_PATH)
TESTS = @BUILD_TESTS@
EXTRA_PROGRAMS = h5u_test h5b_test h5_attach_test
......
......@@ -6,28 +6,22 @@ if ENABLE_VTKCONVERTER
SUBDIRS += vtk2h5grid
endif
AM_LDFLAGS = -L../src/lib @LDFLAGS@
LIBS = -lH5hut @LIBS@
AM_CPPFLAGS += -I${abs_top_builddir}/src/include -Wno-deprecated
FFLAGS += -cpp $(AM_CPPFLAGS)
AM_LDFLAGS += -L${abs_top_builddir}/src/lib
AM_CPPFLAGS = -I../src/include @AM_CPPFLAGS@
LDADD =
LDADD += -lH5hut
LDADD = \
../src/C/libH5hutC.la \
../src/h5core/libH5hut.la
# What to build... make install will place these files in the $(prefix)/bin directory.
bin_PROGRAMS = @BUILD_TOOLS@
if ENABLE_C
EXTRA_SCRIPTS = h5hutcc
EXTRA_PROGRAMS = h5pAttrib
endif
# Listing of all programs that maybe built. (Has to know statically...)
EXTRA_SCRIPTS = h5hutcc
# Extra files that I wish to include in the dist tar ball.
#EXTRA_DIST = h5pAttrib.cc h5pToGNUplot.cc## TO BE TAILORED LATER...
# Listing of sources
h5pAttrib_SOURCES = h5pAttrib.cc
#h5pToGNUplot_SOURCES = h5pToGNUplot.cc
clean: clean-am
......
AM_CPPFLAGS += -I${abs_top_builddir}/src/include -Wno-deprecated
FFLAGS += -cpp $(AM_CPPFLAGS)
LDFLAGS += -L${abs_top_builddir}/src/lib
AM_LDFLAGS += -L${abs_top_builddir}/src/lib
LDADD =
LDADD += -lH5hut -lvtkCommon -lvtkIO
bin_PROGRAMS =
bin_PROGRAMS += vtk2h5grid
vtk2h5grid_SOURCES = vtk2h5grid.cc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment