/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
 *        For full copyright information see:'andrew/config/COPYRITE'     *
\* ********************************************************************** */

/*
	$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.
* $
*/

DOBJS = app.do atom.do atomlist.do bind.do cursor.do dataobj.do describe.do \
	environ.do event.do filetype.do fontdesc.do init.do keymap.do \
	keyrec.do keystate.do menulist.do message.do msghndlr.do \
	namespc.do observe.do path.do proctbl.do profile.do region.do rm.do \
	updlist.do view.do winsys.do rastio.do traced.do color.do cmap.do \
	image.do gif.do jpeg.do owatch.do messitem.do xbitmap.do

IHFILES = app.ih atom.ih atomlist.ih bind.ih cursor.ih dataobj.ih describe.ih \
	environ.ih event.ih filetype.ih fontdesc.ih graphic.ih im.ih init.ih \
	keymap.ih keyrec.ih keystate.ih menulist.ih message.ih msghndlr.ih \
	namespc.ih observe.ih path.ih pixelimg.ih proctbl.ih profile.ih \
	region.ih rm.ih updlist.ih view.ih winsys.ih rastio.ih traced.ih \
	color.ih cmap.ih image.ih gif.ih jpeg.ih owatch.ih messitem.ih xbitmap.ih

DOCS = app.doc atom.doc atomlist.doc attribs.doc basinit.doc \
	bind.doc cursor.doc dataobj.doc describe.doc environ.doc \
	event.doc filetype.doc fontdesc.doc graphic.doc im.doc \
	init.doc keymap.doc keyrec.doc keystate.doc lwpstubs.doc \
	menulist.doc message.doc msghndlr.doc namespc.doc \
	observe.doc physical.doc pixelimg.doc point.doc proctbl.doc \
	profile.doc rect.doc region.doc rm.doc sizes.doc updlist.doc view.doc \
	winsys.doc image.doc

NormalObjectRule()
NormalATKRule()

all:: basinit.o lwpstubs.o

InstallMultiple(physical.h point.h rect.h attribs.h, $(INSTINCFLAGS), $(DESTDIR)/include/atk)

DynamicObject(proctbl, $(UTILLIB), $(BSDLIB))
all:: $(IHFILES) im.o

#if defined(sys_sgi_4d) || defined(sys_sun3_35) || defined(sys_sun4_40) || defined(sys_vax_3)
/* Systems that have _end-related problems */
DynamicMultiObject(im.do, im.o rect.o point.o physical.o,,)
#else
#if defined(ANDREW_MALLOC_ENV) || defined(DEBUG_MALLOC_ENV)
DynamicMultiObject(im.do, im.o rect.o point.o physical.o, $(MALLOCLIB), $(BSDLIB))
#else
DynamicMultiObject(im.do, im.o rect.o point.o physical.o,, $(BSDLIB))
#endif
#endif

DynamicMultiObject(cursor.do, cursor.o rect.o point.o physical.o,,)
DynamicMultiObject(graphic.do, graphic.o rect.o point.o physical.o,$(BASEDIR)/lib/libshadows.a,)
DynamicMultiObject(view.do, view.o rect.o point.o,,)

DynamicObject(path, $(UTILLIB), $(BSDLIB))
DynamicObject(event, $(UTILLIB), $(BSDLIB))
DynamicObject(environ, $(UTILLIB), $(BSDLIB)) 

#ifdef HAVE_SHARED_LIBRARIES
SYSLIBS = $(XLIB)
#else
LIBS = $(XLIB)
#endif
DynamicObject(region, $(LIBS), $(SYSLIBS))

DynamicMultiObject(pixelimg.do, pixelimg.o rect.o point.o,,)
DynamicMultiObject(image.do,imageaux.o image.o,$(UTILLIB), $(MATHLIB))
DynamicMultiObject(gif.do, gif.o gifwr.o imageaux.o,,)

#if !defined(MK_JPEG)
LOCALINCLUDES = -I$(JPEGINCLUDES)        
#endif
DynamicMultiObject(jpeg.do, jpeg.o imageaux.o,$(JPEGLIB),)

InstallClassFiles($(DOBJS) graphic.do pixelimg.do, $(IHFILES))

#if defined(HAVE_SHARED_LIBRARIES)
InstallClassFiles(im.do, im.ih)
#endif /* sys_rt_r3 || LIBDL_ENV */

DependTarget()

NormalHelpRule()
InstallDocs($(DOCS), $(DESTDIR)/doc/atk/basics)

InstallDocs(initfls.help improc.help cutbuf.help menus.help fontprob.help, $(DESTDIR)/help)

InstallHelpAlias(initfls, initfiles initfile .atkinit .be2init .ezinit atkinit be2-init be2init ezinit ez-init atk-init)
InstallHelpAlias(improc, improcs)
InstallHelpAlias(cutbuf, cutbuffer cutbuff)
InstallHelpAlias(menus, menu menus-tutorial menu-tutorial popup pop-up)
InstallHelpAlias(fontprob, font-problems fonts font icon icons cursor cursors)
InstallDocs(app.pr, $(DESTDIR)/lib/prs)
