

/*
	$Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
*DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
*WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
*ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
*OF THIS SOFTWARE.
* $
*/
#ifdef _IBMR2
BSDLIB = -lbsd
#endif

/* uncomment this line to keep figobj and all its subclasses as separate objects, rather than linking them all into figure.do */
/*#define SEPARATEFIGOBJECTS*/

FIGOBJS =  figobj.o figogrp.o figorect.o figoell.o figorrec.o figoplin.o figospli.o figotext.o figoins.o
FIGDOBJS =  figobj.do figogrp.do figorect.do figoell.do figorrec.do figoplin.do figospli.do figotext.do figoins.do
NONFIGDOBJS = figure.do figv.do figtoolv.do figattr.do fontsel.do fontselv.do fontsamp.do figio.do
FIGOIH = figobj.ih figogrp.ih figorect.ih figoell.ih figorrec.ih figoplin.ih figospli.ih figotext.ih figoins.ih 
NONFIGIH = figure.ih figv.ih figtoolv.ih figattr.ih fontsel.ih fontselv.ih fontsamp.ih figio.ih

#ifdef SEPARATEFIGOBJECTS
DEFINES = -D_SEPARATEFIGOBJECTS=1
DOBJS = ${NONFIGDOBJS} ${FIGDOBJS}
IHFILES = ${NONFIGIH} ${FIGOIH}
#else
DOBJS = ${NONFIGDOBJS}
IHFILES = ${NONFIGIH} ${FIGOIH}
#endif

NormalObjectRule()
NormalATKRule()

DynamicObject(figv, ${BASEDIR}/lib/atk/libbasics.a,)
DynamicObject(figio, , -lm)

#ifdef SEPARATEFIGOBJECTS
DynamicObject(figobj, ${BASEDIR}/lib/atk/libbasics.a,)
DynamicObject(figogrp, ${BASEDIR}/lib/atk/libbasics.a,)
DynamicObject(figoplin, , -lm)
DynamicObject(figure, ${BASEDIR}/lib/atk/libbasics.a,)

InstallClassFiles($(DOBJS), $(IHFILES))
#else

DynamicMultiObject(figure.do, figure.o ${FIGOBJS}, ${BASEDIR}/lib/atk/libbasics.a, -lm)

InstallClassFiles($(DOBJS), $(IHFILES))

#endif

InstallLink(runapp, ${DESTDIR}/bin/figure)

SYSLIBS = -lm

NormalHelpRule()
InstallDocs(figure.help, $(DESTDIR)/help)
InstallDocs(figure.pr, ${DESTDIR}/lib/prs)

/* InstallHelpAlias: the second argument is a space-separated list of aliases */
InstallHelpAlias(figure, drawing)

DependTarget()
