$NetBSD: patch-al,v 1.3 2002/05/03 23:14:52 jtb Exp $ --- /dev/null Wed May 1 14:04:01 2002 +++ hdf/test/Makefile Wed May 1 14:13:47 2002 @@ -0,0 +1,61 @@ +CSRCS= rig.c sdstr.c blocks.c an.c anfile.c extelt.c file.c file1.c \ + vers.c sdmms.c sdnmms.c slab.c litend.c tvset.c comp.c bitio.c \ + tree.c macros.c conv.c nbit.c man.c mgr.c testhdf.c tbv.c \ + tvsfpack.c chunks.c tvattr.c buffer.c + +COBJS= ${CSRCS:.c=.o} + +FSRCS= fortest.c fortestF.f forsupff.f forsupf.c \ + manf.f mgrf.f slabwf.f t24f.f tanf.f tanfilef.f tpf.f tr8f.f \ + tsdmmsf.f tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f \ + tvsetf.f, tvattrf.f + +FOBJS= fortestF.o forsupff.o forsupf.o \ + manf.o mgrf.o slabwf.o t24f.o tanf.o tanfilef.o tpf.o tr8f.o \ + tsdmmsf.o tsdnmmsf.o tsdnntf.o tsdntf.o tsdstrf.o tstubsf.o \ + tvsetf.o tvattrf.o + +CPPFLAGS+= -Dunix +CPPFLAGS+= -I${.CURDIR}/../src + +LDFLAGS+= -L${.CURDIR}/../src +LDFLAGS+= -Wl,-R${BUILDLINK_PREFIX.jpeg}/lib +LDFLAGS+= -Wl,-R${BUILDLINK_PREFIX.zlib}/lib + +LDADD+= -ldf -ljpeg -lz -lm + +FTESTS = fortest fortestF + +all: testhdf ${FTESTS} gentest + +TESTF = fortest.o + +TESTDIR = testdir + +${FOBJS}: fortest.inc + +test: atest-hdf + +atest-hdf: testhdf ${FTESTS} + -rm -f *.hdf + +testhdf: ${COBJS} + ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $? ${LDFLAGS} ${LDADD} + test -d ${TESTDIR} || mkdir ${TESTDIR} + +fortestF: ${FOBJS} + ${FC} ${FFLAGS} -o $@ $? ${LDFLAGS} ${LDADD} + +fortest: fortest.o + ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $? ${LDFLAGS} ${LDADD} + +gentest: gentest.o + ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ $? ${LDFLAGS} ${LDADD} + +clean: + ${RM} testhdf ${COBJS} ${FOBJS} ${FTESTS} \ + core *.hdf ptesthdf qtesthdf gentest *.o fortest.arg ${TESTDIR}/* \ + .depend + +depend: + mkdep ${CFLAGS} ${CSRCS}