############################################################################# # # Copyright by The HDF Group. # All rights reserved. # # This file is part of the hl_region High-Level HDF5 APIs. The full copyright # notice, including terms governing use, modification, and redistribution, # is contained in the file COPYING, which can be found at the root of the # source code distribution tree and in the documentation directory (doc/html/). # If you do not have access to this file, you may request a copy of # "the hl_region High-Level HDF5 APIs copyright and license statement" from # help@hdfgroup.org. # ############################################################################# # compiler CC = $(HDF5_INSTALL_DIR)/bin/h5cc FC = $(HDF5_INSTALL_DIR)/bin/h5fc # source files. SRC_C = hl_region_H5LTf.c hl_region_H5LRf.c SRC_F90 = hl_region_H5LTff.f90 hl_region_H5LRff.f90 h5hl_region.f90 OBJ_C = $(SRC_C:.c=.o) OBJ_F90 = $(SRC_F90:.f90=.o) OUT = ./libhdf5_hl_region_fortran.a # include directories INCLUDES = -I$(HDF5_INSTALL_DIR)/include default: $(OUT) .c.o: $(CC) $(INCLUDES) $(CCFLAGS) -c $< -o $@ %.o %.mod: %.f90 $(FC) $(INCLUDES) $(FCFLAGS) -c $< -o $@ $(OUT): $(OBJ_C) $(OBJ_F90) ar rcs $(OUT) $(OBJ_C) $(OBJ_F90) # link the module files so the compiler can find them # to avoid setting the module path explicitly ln -sf ../src/hl_region_h5lr.mod ../examples/hl_region_h5lr.mod ln -sf ../src/hl_region_h5lt.mod ../examples/hl_region_h5lt.mod ln -sf ../src/h5hl_region.mod ../examples/h5hl_region.mod ln -sf ../src/hl_region_h5lr.mod ../test/hl_region_h5lr.mod ln -sf ../src/hl_region_h5lt.mod ../test/hl_region_h5lt.mod ln -sf ../src/h5hl_region.mod ../test/h5hl_region.mod clean: \rm -f $(OBJ_C) $(OBJ_F90) $(OUT) *.mod # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* h5hl_region.o: h5hl_region.f90 hl_region_H5LRff.o hl_region_H5LTff.o