#ident "%W%" %G%
 
# Copyright (C) 1994 Kubota Graphics Corp.
# 
# Permission to use, copy, modify, and distribute this material for
# any purpose and without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all
# copies, and that the name of Kubota Graphics not be used in
# advertising or publicity pertaining to this material.  Kubota
# Graphics Corporation MAKES NO REPRESENTATIONS ABOUT THE ACCURACY
# OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED
# "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE AND KUBOTA GRAPHICS CORPORATION DISCLAIMS ALL WARRANTIES,
# EXPRESS OR IMPLIED.
 

INSTALL_ROOT=
INSDIR=$(INSTALL_ROOT)/usr/opt/KWS/examples/dore

all: single

single:
	cd util; $(MAKE) PRECISION=SINGLE DORELIB=-ldore INCDIR=/usr/include
	cd generic; $(MAKE) PRECISION=SINGLE DORELIB=-ldore INCDIR=/usr/include
	cd programs; $(MAKE) PRECISION=SINGLE DORELIB=-ldore INCDIR=/usr/include

double:
	cd util; $(MAKE) PRECISION=DOUBLE DORELIB=-ldore_d INCDIR=/usr/include
	cd generic; $(MAKE) PRECISION=DOUBLE DORELIB=-ldore_d INCDIR=/usr/include
	cd programs; $(MAKE) PRECISION=DOUBLE DORELIB=-ldore_d INCDIR=/usr/include

#    	The following is to test a development library (single precision)
test:
	cd util; $(MAKE) PRECISION=SINGLE DORELIB=$(DORELIB) INCDIR=$(INCDIR)
	cd generic; $(MAKE) PRECISION=SINGLE DORELIB=$(DORELIB) INCDIR=$(INCDIR)
	cd programs; $(MAKE) PRECISION=SINGLE DORELIB=$(DORELIB) INCDIR=$(INCDIR)

clean:
	cd util; $(MAKE) clean
	cd generic; $(MAKE) clean
	cd programs; $(MAKE) clean

clobber: clean

install:
	-mkdir -p -p $(INSDIR)
	$(MAKE) clean
	find . -print | cpio -pvudm $(INSDIR)
	find $(INSDIR) -type f -exec chmod 644 {} \;
	find $(INSDIR) -type d -exec chmod 775 {} \;
