/* XDim Imake */

/************************************************************************
 *									*
 * XDim was developed 1994/95 by W. Benzing,				*
 *									*
 * 	benzing@iegi01.etec.uni-karlsruhe.de				*
 *									*
 * XDim is a Motif application, which allows you to visualize		*
 * 2D-Datafields.							*
 * XDim is free of copyright which means, that you can use XDim or any	*
 * part of it to any purpose you can think of				*
 *									*
 * BUT IN THE GIF AND JPEG SUBDIRECTORIES ARE FILES INCLUDED THAT ARE   *
 * OF COPYRIGHT SO PLEASE READ THEM BEFORE USE				*
 *									*
 * STANDARD DISCLAIMER:							*
 * 									*
 * XDIM IS NOT GUARANTEED TO BE OF ANY USE AT ALL. QUITE IN CONTRARY	*
 * THE USE OF THIS PROGRAM AND/OR ANY INCLUDED FILE MAY LEAD TO		*
 * CORRUPTED DATA AND/OR DISKS.						*
 * BY USING THIS PROGRAM YOU ACCEPT THE RISKS AND AGREE NOT MAKE THE	*
 * AUTHOR LIABLE FOR ANY DAMAGE DONE TO YOUR HARDWARE, SOFTWARE,	*
 * DATA ETC.(INCLUDING LIFE, UNIVERSE AND EVERYTHING).			*
 * IN COUNTRIES WHERE THIS EXCLUSION OF LIABILITY IS NOT ALLOWED	*
 * THE USE OF XDIM IS FORBIDDEN BY THE AUTHOR.				*
 *									*
 * See also const.h to change some system dependent values		*
 *									*
 * W. Benzing 1994							*
 */

/*
 * define your favorite C-compiler, but make sure
 * it understands ANSI C
 * (gcc prefered)
 */

CC = cc

/*
 * USE the CDEBUGFLAG to pass compiler options
 * normally -g means include debug information
 * -O or -O2 means optimization
 * the graphic algorithm on my ALPHA AXP runs
 * up to ten times faster with optimization on
 */

CDEBUGFLAGS = -O

/*
 * define here anything you want to be passed to the subdirs
 * gif and jpeg
 *
 * the files in these directories are not written by me
 * I only made changes to the gif lib to make it run at all
 * the excellent jpeg lib didn't need such changes.
 * Remember to take a look at the Makefiles and README's in these
 * directories as well, both of them use a COPYRIGHT, READ IT
 * before use
 */

#define PassFlags 'CC=$(CC)' 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CCOPTIONS=$(CCOPTIONS)'

/*
 * if you don't have an ANSI C-compiler
 * (like the free gcc) at hand, don't try
 * to compile the program, it won't work
 * most compiler recognize K&R style or
 * ansi C automatically, but some don't
 * so set the flag here
 */

CCOPTIONS =

/*
 * with these defines you can change the behaviour
 * of the program
 * MULTZ :	use multiplication in inner graphic loop,
 *		on systems with fast multiplication about 2x faster. But
 *		for triangles with a high height/width ratio errors in the
 *		color modes may occur.
 * D16   :	define pixels to be 16 bit, you get the best performance
 *		if the pixel size is the same or bigger than on the X11 server
 * D32   :	same for 32 bit pixels, theoretically you can use
 *		32 bit pixels on a 1 bit display, (which is nonsense of course)
 *		the number of bits is set INDEPENDENT of the number of
 *		colors set in const.h, BUT the number of colors must be <= 2^D .
 *
 * REDRAW_TIME:	measure the time needed for a redraw
 *
 * DEC	 :	this program was developed on an alpha axp from DEC
 *		so I made use of the DXM library, which has a nice
 *		colormixing widget, if you don't have acces to this
 *		library make sure DEC is not defined, but normally
 *		Imake should take care of this (see also the comments
 *		in xdmotif.c)
 */

EXTRA_DEFINES = -DMULTZ

/*
 * define here additional directories you want to be searched for includes
 */

EXTRA_INCLUDES = -Ijpeg

/*
 * define here your libraries you want included, p.ex. the Motif
 * lib if not found in a standard place.
 */

OTHER_LIBRARIES =

/*
 *
 * now do :
 *
 * xmkmf
 * make depend
 * make
 *
 * to install the program copy it to a place, that is in the search path
 * like /usr/local/bin/X11
 * make sure it has access to the application resource file ./XDim
 * by copying it to the right dirctory p.ex. /usr/lib/X11/app-defaults
 * or set the (right) Systemvariable, p.ex. :
 *
 * setenv XAPPLRESDIR .
 * 
 * allows you to run it from the directory you are in
 *
 * Normally you shouldn't have to change anything below this line.
 * But some reported problems with the NamedTargetSubdirs macro
 * this macro does nothing but step into the gif and jpeg directory
 * and do a <make all> there. In this case just perfom make yourself.
 * Someone also reported that the motif libraries (should be done
 * by $(XMLIB) ) are not setup correctly. In this case edit the
 * Makefile and add the libraries yourself, but some linkers need
 * them in a specific order (standard libs -> dxlib (DEC only)
 * -> motiflib -> xtoolkit ->xlib).
 */
 
/*---------------------------------------------------------------------------*/


SRCS = xdim.c coor.c file.c grfx.c hwx11.c xdjpeg.c xtmath.c xdmotif.c xdtk.c

OBJS = xdim.o coor.o file.o grfx.o hwx11.o xdjpeg.o xtmath.o xdmotif.o xdtk.o

EXTRA_LIBRARIES  = -Lgif -lgifcode -Ljpeg -ljpeg
SYS_LIBRARIES = -lm $(DXMLIB) $(OTHER_LIBRARIES) $(XMLIB) $(XTOOLLIB) $(XLIB)

NamedTargetSubdirs(all,gif jpeg,"making" $@,PassFlags,$@)
NamedCleanSubdirs(clean,gif jpeg)
ComplexProgramTarget(xdim)

