# GNU Makefile to build the hdf5todv utility # # $Header: /mnt/data2/cvs2svn/cvs-repositories/VizTools/DataVaultXVSutils/GNUmakefile,v 1.1.1.1 2004-01-30 12:27:35 tradke Exp $ # check that the environment points to the SDF and HDF5 installations ifeq ($(SDF_DIR),) $(error "You must set SDF_DIR to point to your SDF installation !") endif ifeq ($(HDF5_DIR),) $(error "You must set HDF5_DIR to point to your HDF5 installation !") endif # find out what compile and link flags HDF5 itself needs HDF5_CC := $(shell grep -s 'C Compiler:' $(HDF5_DIR)/lib/libhdf5.settings | cut -f2 -d':') HDF5_CFLAGS := $(shell grep -s 'Compiler switches:' $(HDF5_DIR)/lib/libhdf5.settings | cut -f2-) HDF5_LIBS := $(shell grep -s 'Extra libraries:' $(HDF5_DIR)/lib/libhdf5.settings | cut -f2-) # now set the makefile variables for compiling and linking CC = $(HDF5_CC) CFLAGS = -I$(SDF_DIR)/include -I$(HDF5_DIR)/include $(HDF5_CFLAGS) -g LDLIBS = -L$(SDF_DIR)/lib -L$(HDF5_DIR)/lib -lhdf5 $(HDF5_LIBS) -lbbhutil -lsv # the build rules all: hdf5todv .PHONY: clean clean: rm -f hdf5todv