head	1.10;
access
	monica
	thoth
	fjsoria;
symbols;
locks
	monica:1.10; strict;
comment	@// @;


1.10
date	95.01.24.16.21.26;	author monica;	state Exp;
branches;
next	1.9;

1.9
date	95.01.04.06.49.54;	author monica;	state Exp;
branches;
next	1.8;

1.8
date	95.01.04.06.42.18;	author monica;	state Exp;
branches;
next	1.7;

1.7
date	94.12.30.20.57.30;	author monica;	state Exp;
branches;
next	1.6;

1.6
date	94.12.08.14.36.58;	author monica;	state Exp;
branches;
next	1.5;

1.5
date	94.11.17.04.27.58;	author monica;	state Exp;
branches;
next	1.4;

1.4
date	94.11.17.04.22.15;	author monica;	state Exp;
branches;
next	1.3;

1.3
date	94.08.18.22.15.27;	author thoth;	state Exp;
branches;
next	1.2;

1.2
date	93.04.17.20.23.50;	author thoth;	state Exp;
branches;
next	1.1;

1.1
date	93.03.10.13.57.51;	author thoth;	state Exp;
branches;
next	;


desc
@This is how we build various tests.
@


1.10
log
@complex for g++ is a problem
@
text
@#
# this is a GNUmakefile.  It must be processed with GNU make.
#

#TARGET_ARCH=
#TOP= ../..

# you should define the make variables LOBJS and HEADERS before the
# include directive.  LOBJS is a list of Library OBJects that belong
# in libiac++.a.  HEADERS is a list of public header files that belong
# in iac++/include.

#LOBJS= generic-tests.o
#HEADERS= PointSet.h
#REGTESTS= ${basename ${wildcard test2??.c}}

include ${TOP}/src/gnumake.templ

#all: ${REGTESTS}

#WORKLIB= ${TOP}/lib/libiacc++.a

#lib: ${LOBJS}
#	ar r ${WORKLIB} ${LOBJS}
#	ranlib ${WORKLIB}
#	touch lib

IACCDIR = /cis/research/iac++/expbuilds/test

IACCINCLUDES = -I${IACCDIR}/include

INCLUDEFLAGS= -I. ${IACCINCLUDES}
CDEBUGFLAGS=-g
CCFLAGS= ${CDEBUGFLAGS} ${INCLUDEFLAGS}
LDDIRS= -L${IACCDIR}/lib
LDLIBS= -liac++ -lm 
# complex problem for g++
#LDLIBS= -liac++ -lcomplex -lm 
LDFLAGS= ${LDDIRS} # ${LDLIBS}

COMPILE.cc=${CCC} ${CCFLAGS} ${CPPFLAGS} ${TARGET_ARCH} -c
LINK.cc=${CCC} ${CCFLAGS} ${CPPFLAGS} ${LDFLAGS} ${TARGET_ARCH}

# Testing:
#LDLIBS= -L${TOP}/lib/ -liac++ -lcomplex -lm
#INCS= -I${TOP}/include

#test%.c: test.h
#	${LINK.cc} -o $@@ $< ${LDLIBS}

test%: test%.o 
	${LINK.cc} -o $@@ $< ${LDLIBS}

test%.o: test%.c test.h
	${COMPILE.cc} ${OUTPUT_OPTION} $<

create:
	for x in test*.c ; \
		do \
			y=`basename $$x .c` ;    \
			gnumake $$y ;            \
			$$y 1>$$y.expected 2>&1; \
			rm -f $$y ;              \
		done

test:
	for x in test*.expected; \
		do \
			y=`basename $$x .expected` ;     \
			gnumake $$y ;             \
			./$$y 1>$$y.out 2>&1;       \
			rm -f $$y ;		  \
			if test -f $$y.out;	\
			then diff $$y.expected $$y.out 1> $$y.diff 2>&1; \
				if test -s $$y.diff;	\
				then echo "DIFFs on TEST $$y" ;	\
				else rm $$y.diff	;\
				fi;	\
			fi;	\
		done
test2.2:
	for x in test093.expected test094.expected test095.expected test096.expected test097.expected test098.expected test099.expected; \
		do \
			y=`basename $$x .expected` ;     \
			gnumake $$y ;             \
			./$$y 1>$$y.out 2>&1;       \
			rm -f $$y ;		  \
			if test -f $$y.out;	\
			then diff $$y.expected $$y.out 1> $$y.diff 2>&1; \
				if test -s $$y.diff;	\
				then echo "DIFFs on TEST $$y" ;	\
				else rm $$y.diff	;\
				fi;	\
			fi;	\
		done

rediff:
	for x in test*.diff; \
		do \
			y=`basename $$x .diff` ;     \
			rm $$y.diff;	\
			gnumake TOP=${TOP} $$y ;             \
			./$$y 1>$$y.out 2>&1;       \
			rm -f $$y ;		  \
			if test -f $$y.out;	\
			then diff $$y.expected $$y.out 1> $$y.diff 2>&1; \
				if test -s $$y.diff;	\
				then echo "DIFFs on TEST $$y" ;	\
				else rm $$y.diff	;\
				fi;	\
			fi;	\
		done
compare:
	for x in test???.c; \
	do \
		y=`basename $$x .c`; \
		diff $$y.expected $$y.out 1> $$y.diff 2>&1; \
		if test -s $$y.diff;	\
			then echo "DIFFs on TEST $$y" ;	\
			else rm $$y.diff	;\
		fi;	\
	done
#		cmp $$x $$y.out;             \

# sample program target:
# test1 only needs test1.o and the library.  The defaults will
# build this without a rule
#
#all: test1 test2
#
#T2OBJS= test2.o frob.o
#test2: ${T2OBJS}
#	${CCC} -o $@@ ${CCFLAGS} ${CPPFLAGS} ${LDFLAGS} ${T2OBJS} ${LDLIBS}

# the gnumake.templ has a few targets that everyone will use
#
# all: install the header files, build the LOBJS and add them
# to the library
#
# headers-force: force the header files to be copied into include
#
# headers: used by all to install the header files when changed
#
# lib: used by all to add LOBJS to the libwork.a.  libwork.a is
# your own personal copy of the libiac++.a that only contains the
# parts you are working on.
#
# reallib: this puts your LOBJS into the real libiac++ so that
# everyone else can use them.  Make sure they work first.
#
# clean:: removes all .o and ~ files.  You may define additional
# clean targets to remove other files that you may have generated.
#
# spotless:: the same as clean, but more so.  It should remove
# binaries.  You should define additional spotless targets that
# remove your test binaries and other files that aren't deleted
# by clean.



@


1.9
log
@*** empty log message ***
@
text
@d6 1
a6 1
TOP= ../..
d28 1
a28 1
IACCDIR = /cis/research/iac++/new
d36 3
a38 1
LDLIBS= -liac++ -lcomplex -lm 
@


1.8
log
@added a rediff routine
@
text
@d69 1
a69 1
			$$y 1>$$y.out 2>&1;       \
d84 1
a84 1
			$$y 1>$$y.out 2>&1;       \
d101 1
a101 1
			$$y 1>$$y.out 2>&1;       \
@


1.7
log
@minor mods to match GNUmakefile form of other test dirs.
@
text
@d95 16
@


1.6
log
@added 2.2 target
@
text
@d17 1
a17 1
include ${TOP}/src/iac++/src/gnumake.templ
a31 1
CCC=/local/bin/CC -pg
d35 1
a35 4
LDDIRS= -L${IACCDIR}/lib 

#LDLIBS= generic-tests.o pointset-utils.o point-utils.o -liac++ -lcomplex -lm /usr/lib/debug/malloc.o /usr/lib/debug/mallocmap.o

a36 1

a40 8
.C:
	$(LINK.cc) -o $@@ $< $(LDLIBS)
.C.o:
	$(COMPILE.cc) $(OUTPUT_OPTION) $<
.c:
	$(LINK.cc) -o $@@ $< $(LDLIBS)
.c.o:
	$(COMPILE.cc) $(OUTPUT_OPTION) $<
d43 1
a43 1
#LDLIBS= -L${TOP}/lib/ -liac++ -lcomplex -lm /usr/lib/debug/malloc.o /usr/lib/debug/mallocmap.o
d52 1
a52 1
test%.o: test%.c
d56 1
a56 1
	for x in test05*.c test060.c test061.c test062.c; \
@


1.5
log
@*** empty log message ***
@
text
@d92 15
a106 1
#			cmp $$y.expected $$y.out 1>$$y.cmp 2>&1; \
@


1.4
log
@*** empty log message ***
@
text
@d78 1
a78 1
	for x in test06?.c test07?.c test08?.c test1??.c; \
d80 1
a80 1
			y=`basename $$x .c` ;     \
@


1.3
log
@*** empty log message ***
@
text
@d5 2
a6 2
TARGET_ARCH=
TOP=../..
d13 126
a138 1
LOBJS =
a139 6
HEADERS=
# test001 test003 test100 test101
SIMPLETESTS= test107 test109 test110 test111 test112 test115 test119 \
	test120 test121 test122 test123 test124 test125 test126 \
#  test113 test114
# the previous tests are broken due to unavailability of IDM
a140 1
TESTS= ${SIMPLETESTS} test103 test104 test108 # test102 test106 test116 
a141 62
OTHER_CFLAGS= -O

#XTRACCFLAGS=-ptmlinkmap

CLOSUREARGS=

testprogs:

include ../../depot/src/gnumake.templ

# temporary stuff to override depot during the new-image experimental stages
INCLUDEFLAGS= -I. -I${INCDIR} ${EXTRAINCLUDES}
LDLIBS = -L${TOP}/lib ${OTHERLIBS} -liac++ -lcomplex -lm

lib: ${WORKLIB}
	touch lib

DEMOBJS = Demo.o # IntDI.o # DIintglobals.o # ImageDisplayProtocol.o
Demo: ${DEMOBJS} lib
	${LINK.cc} -pti -o $@@ ${DEMOBJS} ${LDLIBS}

test002: test002.o lib
	${LINK.cc} -pti -o test002 test002.o ${LDLIBS}

T102OBJS = test102.o test102b.o test102c.o IntDI.o
test102: ${T102OBJS} lib
	${LINK.cc} -pti -o $@@ ${T102OBJS} ${LDLIBS} /usr/lib/debug/malloc.o

test103: test103.o lib
	${LINK.cc} -pti -o $@@ test103.o ${LDLIBS} /usr/lib/debug/malloc.o

T104OBJS= test104.o test-ops.o
test104: ${T104OBJS} lib
	${LINK.cc} -o $@@ ${T104OBJS} ${LDLIBS}

T105OBJS= test105.o test-ops.o
test105: ${T105OBJS} lib
	${LINK.cc} -ptmlinkmap -o $@@ ${T105OBJS} ${LDLIBS}

T106OBJS= test106.o test-ops.o
test106: ${T106OBJS} lib
	${LINK.cc} -ptmlinkmap -o $@@ ${T106OBJS} ${LDLIBS}

T108OBJS= test108.o test-ops.o
test108: ${T108OBJS} lib
	${LINK.cc} -ptmlinkmap -o $@@ ${T108OBJS} ${LDLIBS}

test116.o: test116.c
	${COMPILE.cc} $(OUTPUT_OPTION) -Ikhoros/include test116.c

test116: test116.c lib
	${LINK.cc} -o $@@ -Ikhoros/include test116.c  -Lkhoros/lib/ -lvutils -lvgparm ${LDLIBS}

T117OBJS= test117.o test-ops.o randomIA.o
test117: ${T117OBJS} lib
	${LINK.cc} -ptmlinkmap -o $@@ ${T117OBJS} ${LDLIBS}

clean:

spotless: clean

# dependencies
@


1.2
log
@*** empty log message ***
@
text
@d17 4
a20 1
SIMPLETESTS= test107 test109 test110
d22 1
a22 1
TESTS= ${SIMPLETESTS} test102 test103 test104 test106 test108
d26 1
a26 1
XTRACCFLAGS= -p # -pti
d28 1
a28 1
include /cis/vision/src/iac++/src/gnumake.templ
d30 9
a38 1
lib: ../../lib/libiac++.a
d42 1
a42 1
Demo: ${DEMOBJS} ../image/lib
d45 2
a46 2
test002: test002.o ../image/lib
	${LINK.cc -pti} -o test002 test002.o ${LDLIBS}
d49 1
a49 1
test102: ${T102OBJS} ../image/lib
d52 1
a52 1
test103: test103.o ../image/lib
d56 1
a56 1
test104: ${T104OBJS} ../image/lib
d60 1
a60 1
test105: ${T105OBJS} ../image/lib
d64 1
a64 1
test106: ${T106OBJS} ../image/lib
d68 1
a68 1
test108: ${T108OBJS} ../image/lib
d71 10
a81 1
	rm ${GENERATED_CFILES} ${GENERATED_HFILES}
a83 1
	/bin/rm -r ptrepository
a85 39
Demo.o : Demo.c ../../include/ValueSet.h ../../include/ia.h ../../include/ImageDisplayProtocol.h \
  ../../include/Array.h ../../include/IntDiscreteImage.h ../../include/DiscreteImage.h \
  ../../depot/include/IntPoint.h ../../depot/include/ia.h ../../include/IntPointSet.h \
  ../../include/BaseIPS.h ../../include/BasePS.h ../../include/SetStructure.h \
  ../../include/BaseDI.h ../../include/IntImageOps.h ../../include/DIVIter.h ../../include/BaseDIIter.h \
  ../../include/OtherDI.h ../../include/with-ia-pointset.h 
test-ops.o : test-ops.c ../../include/DIVIter.h ../../include/BaseDIIter.h ../../depot/include/IntPoint.h \
  ../../depot/include/ia.h ../../include/IntPointSet.h ../../include/BaseIPS.h \
  ../../include/BasePS.h ../../include/ia.h ../../include/SetStructure.h ../../include/Array.h \
  ../../include/DiscreteImage.h ../../include/BaseDI.h ../../include/ValueSet.h \
  test-ops.h ../../include/OtherDI.h 
test002.o : test002.c ../../include/ValueSet.h ../../include/ia.h ../../include/IntPointSet.h \
  ../../depot/include/IntPoint.h ../../depot/include/ia.h ../../include/BaseIPS.h \
  ../../include/BasePS.h ../../include/SetStructure.h ../../include/Array.h ../../include/IPSIter.h \
  ../../include/BaseIPSIter.h ../../include/DIVIter.h ../../include/BaseDIIter.h \
  ../../include/DiscreteImage.h ../../include/BaseDI.h ../../include/OtherDI.h \
  ../../include/DIPIter.h ../../depot/include/FloatPoint.h 
test003.o : test003.c ../../include/IntPointSet.h ../../depot/include/IntPoint.h \
  ../../depot/include/ia.h ../../include/BaseIPS.h ../../include/BasePS.h ../../include/ia.h \
  ../../include/SetStructure.h ../../include/Array.h 
test102.o : test102.c ../../include/IntPointSet.h ../../depot/include/IntPoint.h \
  ../../depot/include/ia.h ../../include/BaseIPS.h ../../include/BasePS.h ../../include/ia.h \
  ../../include/SetStructure.h ../../include/Array.h ../../include/DiscreteImage.h \
  ../../include/BaseDI.h ../../include/ValueSet.h ../../include/with-ia-pointset.h 
test103.o : test103.c ../../include/IntPointSet.h ../../depot/include/IntPoint.h \
  ../../depot/include/ia.h ../../include/BaseIPS.h ../../include/BasePS.h ../../include/ia.h \
  ../../include/SetStructure.h ../../include/Array.h ../../include/IntDiscreteImage.h \
  ../../include/DiscreteImage.h ../../include/BaseDI.h ../../include/ValueSet.h \
  ../../include/IntImageOps.h ../../include/with-ia-pointset.h 
test104.o : test104.c ../../include/IntPointSet.h ../../depot/include/IntPoint.h \
  ../../depot/include/ia.h ../../include/BaseIPS.h ../../include/BasePS.h ../../include/ia.h \
  ../../include/SetStructure.h ../../include/Array.h ../../include/IntDiscreteImage.h \
  ../../include/DiscreteImage.h ../../include/BaseDI.h ../../include/ValueSet.h \
  ../../include/IntImageOps.h ../../include/OtherDI.h test-ops.h 
test105.o : test105.c ../../include/IntPointSet.h ../../depot/include/IntPoint.h \
  ../../depot/include/ia.h ../../include/BaseIPS.h ../../include/BasePS.h ../../include/ia.h \
  ../../include/SetStructure.h ../../include/Array.h ../../include/IntDiscreteImage.h \
  ../../include/DiscreteImage.h ../../include/BaseDI.h ../../include/ValueSet.h \
  ../../include/IntImageOps.h test-ops.h ../../include/OtherDI.h 
@


1.1
log
@Initial revision
@
text
@d16 2
a17 2
SIMPLETESTS= # test001 test003 test100 test101
TESTS= ${SIMPLETESTS} test102 test103 test104
d19 2
d27 3
d51 8
@
