aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@21a6bef8-4479-4f54-8f8d-0db94a2919ef>2003-06-17 15:00:34 +0000
committertradke <tradke@21a6bef8-4479-4f54-8f8d-0db94a2919ef>2003-06-17 15:00:34 +0000
commitfc1fd15de8bd8e1ea6884cab5fea9ef2a73634b5 (patch)
tree470258a05e7ef25db0a45b4a4a43ac3b629e9e4f
parent7d93b7392428b8c9fc4a19e0370a4ad991da3f2b (diff)
Compile the HDF5 part of FlexIO (H5IO.cc) directly into the thorn library
if HDF5 is available for this configuration. git-svn-id: http://svn.cactuscode.org/arrangements/CactusExternal/FlexIO/trunk@37 21a6bef8-4479-4f54-8f8d-0db94a2919ef
-rw-r--r--src/make.code.defn7
-rw-r--r--src/make.configuration.deps11
2 files changed, 11 insertions, 7 deletions
diff --git a/src/make.code.defn b/src/make.code.defn
index fd13a65..f5c2158 100644
--- a/src/make.code.defn
+++ b/src/make.code.defn
@@ -3,8 +3,11 @@
# Source files in this directory
SRCS = IO.cc IEEEIO.cc
-# Subdirectories containing source files
-SUBDIRS =
+# enable HDF5 if available
+ifneq ($(HDF5_LIBS),)
+SRCS += H5IO.cc
+endif
+
# Work out some thorn specific compilation flags
# These are stripped down lines from the original IEEEIO makefile
diff --git a/src/make.configuration.deps b/src/make.configuration.deps
index fea553c..d9b2397 100644
--- a/src/make.configuration.deps
+++ b/src/make.configuration.deps
@@ -1,18 +1,19 @@
# make.configuration.deps for FlexIO
# makefile rules to build FlexIO utilities
+FLEXIOLIBS = -L$(CCTK_LIBDIR) -lFlexIO
+
# enable HDF5 if available
ifneq ($(HDF5_LIBS),)
-CXXFLAGS += -DWITH_HDF5 $(HDF5_INC_DIRS:%=-I%) $(SYS_INC_DIRS:%=-I%)
-H5IOOBJ = $(BUILD_DIR)$(DIRSEP)FlexIO$(DIRSEP)H5IO.o
-LDFLAGS += $(H5IOOBJ) $(HDF5_LIB_DIRS:%=-L%) $(HDF5_LIBS:%=-l%) -lm
+CXXFLAGS += -DWITH_HDF5 $(SYS_INC_DIRS:%=-I%)
+FLEXIOLIBS += $(HDF5_LIB_DIRS:%=-L%) $(HDF5_LIBS:%=-l%)
endif
# general linking rule
-$(UTIL_DIR)$(DIRSEP)%: $(BUILD_DIR)$(DIRSEP)FlexIO$(DIRSEP)%.o $(H5IOOBJ)
+$(UTIL_DIR)$(DIRSEP)%: $(BUILD_DIR)$(DIRSEP)FlexIO$(DIRSEP)%.o
@echo Creating $* in $(UTIL_DIR) from $<
if [ ! -d $(UTIL_DIR) ]; then $(MKDIR) $(MKDIRFLAGS) $(UTIL_DIR) ; fi
- $(LD) $(CREATEEXE)$(OPTIONSEP)$@ $(DEBUG_LD) $(LDFLAGS) $(EXTRAFLAGS) $< -L$(CCTK_LIBDIR) -lFlexIO
+ $(LD) $(CREATEEXE)$(OPTIONSEP)$@ $(DEBUG_LD) $(LDFLAGS) $(EXTRAFLAGS) $< $(FLEXIOLIBS)
# general compile rule
$(BUILD_DIR)$(DIRSEP)FlexIO$(DIRSEP)%.o: $(PACKAGE_DIR)$(DIRSEP)CactusExternal$(DIRSEP)FlexIO$(DIRSEP)src$(DIRSEP)%.cc