# HDF5 Library Test Makefile(.in) # # Copyright (C) 1997 National Center for Supercomputing Applications. # All rights reserved. # # @COMMENCE@ # Add include directory to the C preprocessor flags and the hdf5 # library to the library list. CPPFLAGS=-I. -I../src @CPPFLAGS@ LIBS=libh5test.a ../src/libhdf5.a @LIBS@ # These are our main targets. They should be listed in the order to be # executed, generally most specific tests to least specific tests. TEST_PROGS=testhdf5 gheap hyperslab istore bittests dtypes dsets cmpd_dset \ extend external shtype links unlink big mtime fillval mount flush1 \ flush2 TIMINGS=iopipe chunk ragged overhead # The libh5test.a library provides common support code for the tests. LIB=libh5test.a LIB_SRC=h5test.c LIB_OBJ=$(LIB_SRC:.c=.o) # Temporary files MOSTLYCLEAN=cmpd_dset.h5 dataset.h5 extend.h5 istore.h5 tfile1.h5 tfile2.h5 \ tfile3.h5 th5s1.h5 theap.h5 tohdr.h5 tstab1.h5 tstab2.h5 \ extern_1.h5 extern_2.h5 extern_3.h5 extern_1.raw extern_1b.raw \ extern_2.raw extern_2b.raw extern_3.raw extern_3b.raw \ extern_4.raw extern_4b.raw iopipe.raw iopipe.h5 gheap0.h5 \ gheap1.h5 gheap2.h5 gheap3.h5 gheap4.h5 shtype0.h5 shtype1.h5 \ shtype2a.h5 shtype2b.h5 shtype3.h5 links.h5 chunk.h5 big.data \ big[0-9][0-9][0-9][0-9][0-9].h5 dtypes1.h5 dtypes2.h5 tattr.h5 \ tselect.h5 mtime.h5 ragged.h5 grptime.h5 unlink.h5 overhead.h5 \ fillval_[0-9].h5 mount_[0-9].h5 trefer.h5 flush.h5 CLEAN=$(TIMINGS) # Source and object files for programs... The TEST_SRC list contains all the # source files and is used for things like dependencies, archiving, etc. The # other source lists are for the individual tests, the files of which may # overlap with other tests. TEST_SRC=testhdf5.c tattr.c tfile.c theap.c tmeta.c tohdr.c trefer.c \ tselect.c tstab.c th5s.c dtypes.c hyperslab.c istore.c dsets.c \ cmpd_dset.c extend.c external.c iopipe.c gheap.c shtype.c big.c links.c \ chunk.c bittests.c mtime.c ragged.c unlink.c overhead.c fillval.c \ mount.c flush1.c flush2.c TEST_OBJ=$(TEST_SRC:.c=.o) # Private header files (not to be installed)... PRIVATE_HDR=testhdf5.h # Additional targets .PHONY: timings _timings timings _timings: $(TIMINGS) @for timing in $(TIMINGS) dummy; do \ if test $$timing != dummy; then \ echo "Running $$timing $(TEST_FLAGS)"; \ $(RUNTEST) ./$$timing $(TEST_FLAGS) || exit 1; \ fi; \ done; # How to build the tests... They all depend on the test and hdf5 libraries. $(TEST_PROGS): libh5test.a ../src/libhdf5.a TESTHDF5_OBJ=testhdf5.o tattr.o tfile.o theap.o tmeta.o tohdr.o trefer.o tselect.o tstab.o th5s.o testhdf5: $(TESTHDF5_OBJ) $(CC) $(CFLAGS) -o $@ $(TESTHDF5_OBJ) $(LDFLAGS) $(LIBS) gheap: gheap.o $(CC) $(CFLAGS) -o $@ gheap.o $(LDFLAGS) $(LIBS) dsets: dsets.o $(CC) $(CFLAGS) -o $@ dsets.o $(LDFLAGS) $(LIBS) bittests: bittests.o $(CC) $(CFLAGS) -o $@ bittests.o $(LDFLAGS) $(LIBS) dtypes: dtypes.o $(CC) $(CFLAGS) -o $@ dtypes.o $(LDFLAGS) $(LIBS) hyperslab: hyperslab.o $(CC) $(CFLAGS) -o $@ hyperslab.o $(LDFLAGS) $(LIBS) istore: istore.o $(CC) $(CFLAGS) -o $@ istore.o $(LDFLAGS) $(LIBS) cmpd_dset: cmpd_dset.o $(CC) $(CFLAGS) -o $@ cmpd_dset.o $(LDFLAGS) $(LIBS) extend: extend.o $(CC) $(CFLAGS) -o $@ extend.o $(LDFLAGS) $(LIBS) external: external.o $(CC) $(CFLAGS) -o $@ external.o $(LDFLAGS) $(LIBS) shtype: shtype.o $(CC) $(CFLAGS) -o $@ shtype.o $(LDFLAGS) $(LIBS) iopipe: iopipe.o $(CC) $(CFLAGS) -o $@ iopipe.o $(LDFLAGS) $(LIBS) grptime: grptime.o $(CC) $(CFLAGS) -o $@ grptime.o $(LDFLAGS) $(LIBS) big: big.o $(CC) $(CFLAGS) -o $@ big.o $(LDFLAGS) $(LIBS) links: links.o $(CC) $(CFLAGS) -o $@ links.o $(LDFLAGS) $(LIBS) chunk: chunk.o $(CC) $(CFLAGS) -o $@ chunk.o $(LDFLAGS) $(LIBS) mtime: mtime.o $(CC) $(CFLAGS) -o $@ mtime.o $(LDFLAGS) $(LIBS) ragged: ragged.o $(CC) $(CFLAGS) -o $@ ragged.o $(LDFLAGS) $(LIBS) unlink: unlink.o $(CC) $(CFLAGS) -o $@ unlink.o $(LDFLAGS) $(LIBS) overhead: overhead.o $(CC) $(CFLAGS) -o $@ overhead.o $(LDFLAGS) $(LIBS) fillval: fillval.o $(CC) $(CFLAGS) -o $@ fillval.o $(LDFLAGS) $(LIBS) mount: mount.o $(CC) $(CFLAGS) -o $@ mount.o $(LDFLAGS) $(LIBS) flush1: flush1.o $(CC) $(CFLAGS) -o $@ flush1.o $(LDFLAGS) $(LIBS) flush2: flush2.o $(CC) $(CFLAGS) -o $@ flush2.o $(LDFLAGS) $(LIBS) @CONCLUDE@