/***************************************************************************
* ======================================================================
* Computer Vision/Image Processing Tool Project - Dr. Scott Umbaugh SIUE
* ======================================================================
*
*             File Name: CVIPproject.tmpl
*           Description: imake template file containing macros to be used
*                        for constructing CVIPtools target programs.
*			 (i.e. machine dependent compiler flags, make
*                        construction rules, etc.)
*         Related Files: this file should be included in CVIPtools
*			 Imakefiles (e.g. #include <CVIPproject.tmpl>)
*   Initial Coding Date: Tue Apr 27 22:00:22 CDT 1993
*           Portability: Standard (ANSI) C
*             Credit(s): Gregory Hance
*                        Southern Illinois University @ Edwardsville
*
** Copyright (C) 1993 SIUE - by Gregory Hance.
**
** Permission to use, copy, modify, and distribute this software and its
** documentation for any purpose and without fee is hereby granted, provided
** that the above copyright notice appear in all copies and that both that
** copyright notice and this permission notice appear in supporting
** documentation.  This software is provided "as is" without express or
** implied warranty.
**
* RCS (Revision Control System) Information
* ...Added automatically by RCS 
*
** $Log: CVIPlab.tmpl,v $
** Revision 1.14  1997/04/13 20:59:15  yawei
** updated changes
**
** Revision 1.13  1997/04/12 00:15:26  yawei
** used the architecture block of CVIPtools.tmpl
**
** Revision 1.12  1997/04/12 00:09:58  yawei
** cleaned up
**
** Revision 1.11  1997/03/27 03:16:04  yawei
** changed the libraries.
**
** Revision 1.10  1997/03/27 02:44:39  yawei
** GUI ==> Display
**
** Revision 1.9  1997/03/07 04:27:12  yawei
** Added libnoise
**
** Revision 1.8  1996/12/30 16:54:26  yawei
** libspatialfltr ==> libspatialfilter
**
# Revision 1.7  1996/12/13  20:46:55  akjoele
# changed order of libraries.  Now, it will actaully
# compile ok.
#
# Revision 1.6  1996/08/20  15:27:23  akjoele
# Changed linking order so that -lgui is linked before -lhisto,
# because the image viewer now calls histeq_Image, which is
# in libhisto.
#
# Revision 1.5  1996/06/28  01:27:03  sumbaug
# Removed conditional definitions of libraries
#
# Revision 1.4  1996/04/24  21:46:14  kluo
# add -lgui and -lX11 option to use the built-in image viewer.
# Also some libraries like -ltransform are also added.
#
# Revision 1.1  1993/04/29  06:59:42  hanceg
# Initial revision
#
*
****************************************************************************/

/*
 * define arguments to be used with the library
 * archiver -- ar
 */

AR = /bin/ar ruv


/* 
 * define machine/compiler dependent variables
 */

#define DEBUG YES
#if defined(SunArchitecture) && defined(SparcArchitecture)
AR = /usr/ccs/bin/ar ruv
CC = cc
#ifndef DEBUG
CCOPTIONS = -Xc -dalign -xcg92 -lm -xO3 -xunroll=4 -K PIC -xlibmil
CDEBUGFLAGS = -v -fd
#else
CCOPTIONS = -Xc -K PIC
CDEBUGFLAGS = -g -v -fd
#endif
EXTRA_INCLUDES =
EXTRA_LOAD_FLAGS = -lm -lX11
DEFINES = -DSun -DEXTENSIONS
#elif defined(SunArchitecture) && defined(i386Architecture)
AR = /usr/ccs/bin/ar ruv
CC = gcc
CCOPTIONS = -ffast-math -fkeep-inline-functions -funsigned-char -ansi
-O2
CDEBUGFLAGS = -g
EXTRA_INCLUDES =
EXTRA_LOAD_FLAGS = -lm -lX11
#elif defined(SGIArchitecture) /* SunArchitecture */
CC = cc
CCOPTIONS = -ansi
CDEBUGFLAGS =
EXTRA_LOAD_FLAGS = -lm -lX11
AR = /usr/bin/ar ruv
DEFINES = -DSGI
#elif defined(FreeBSDArchitecture)
AR = /usr/bin/ar ruv
CC = gcc
CCOPTIONS = -ffast-math -funsigned-char -ansi -O2
DEFINES = -Di386 -Di386BSD
EXTRA-LOAD-FLAGS = -lm -lX11
#elif defined(LinuxArchitecture)
EXTRA_LOAD_FLAGS = -lm -lX11
#else /* default */
AR = /usr/bin/ar ruv
CC = cc
CCOPTIONS = -O2 -ansi
CDEBUGFLAGS = -g
DEFINES =
#endif /* 4.3bsd */


/*
 * Where CVIPtools is currently installed
 */

#ifndef CVIPtoolsDir
#define CVIPtoolsDir  $(CVIPHOME)/
#endif
#ifndef CVIPtoolsBinDir
#define CVIPtoolsBinDir bin
#endif
#ifndef CVIPtoolsManDir
#define CVIPtoolsManDir man
#endif
#ifndef CVIPtoolsLibDir
#define CVIPtoolsLibDir lib
#endif
#ifndef CVIPtoolsIncDir
#define CVIPtoolsIncDir include
#endif

#define Null /**/


/*
 * define CVIPtools Core toolbox libraries
 */

#define LibSeg                 -lsegment
#define LibMorph               -lmorph
#define LibHisto               -lhisto
#define LibSpatialfltr         -lspatialfilter
#define LibColor               -lcolor
#define LibArithlogic          -larithlogic
#define LibGeometry            -lgeometry
#define LibConvert             -lconverter
#define LibJpeg                -ljpeg
#define LibCompress            -lcompress
#define LibPbmplus             -lpnm -lppm -lpgm -lpbm
#define LibTiff                -ltiff
#define LibNoise               -lnoise
#define LibXformfilter         -lxformfilter
#define LibTransform           -ltransform
#define LibFeature             -lfeature
#define LibDisplay             -ldisplay
#define LibDeform              -ldeform
#define LibApp                 -lapp

#define LibBand                -lband
#define LibIO                  -lio
#define LibImage               -limage
#define LibMap                 -lmap
#define LibMatrix              -lmatrix
#define LibObject              -lobject
#define LibManager             -lmanager
#define LibROI                 -lroi
#define LibVector              -lvector

/*
 * Define the libraries associated with each layer of the
 * CVIPtools development environment.
 * (NOTE: linking order is very important)
 */

#ifndef LibsToolKit 
#define LibsToolKit LibImage LibBand LibMatrix LibVector LibIO \ @@\
	LibObject LibMap LibManager LibROI

#endif
#ifndef LibsCoreToolBox
#define LibsCoreToolBox LibSeg LibMorph LibHisto LibSpatialfltr \ @@\
	LibColor LibArithlogic LibGeometry LibConvert LibJpeg LibCompress \ @@\
	LibPbmplus LibTiff LibNoise LibXformfilter LibTransform LibFeature \ @@\
	LibDisplay LibDeform LibApp

#endif
#ifndef LibsAppToolBox
#define LibsAppToolBox Null
#endif


/*
 * define the path to the CVIPtools libraries and includes
 *
 */

#ifndef IncludePath
#define IncludePath -I$(CVIPTOOLSDIR)$(CVIPTOOLSINCDIR)
#endif
#ifndef LibraryPath
#define LibraryPath -L$(CVIPTOOLSDIR)$(CVIPTOOLSLIBDIR)
#endif


/*
 * assign macros defined above to Bourne shell
 * variables so they will appear in the generated
 * Makefile as well.
 *
 */

   CVIPTOOLSDIR = CVIPtoolsDir
CVIPTOOLSBINDIR = CVIPtoolsBinDir
CVIPTOOLSMANDIR = CVIPtoolsManDir
CVIPTOOLSLIBDIR = CVIPtoolsLibDir
CVIPTOOLSINCDIR = CVIPtoolsIncDir

    INCSCVIPALL = IncludePath

    LIBSCVIPAPP = LibraryPath LibsAppToolBox
   LIBSCVIPCORE = LibsCoreToolBox
LIBSCVIPTOOLKIT = LibsToolKit


/*
 * We don't really have to worry about dependency libs
 * but I'll stick them in here for completeness anyway
 */

DEPLIBSCVIPTOOLKIT = Null
   DEPLIBSCVIPCORE = Null
    DEPLIBSCVIPAPP = Null


/*
 * Define macros used to produce Makefile
 * construction rules for CVIPtools programs.
 */
#ifndef NormalCVIPtoolsProgramTarget
#define NormalCVIPtoolsProgramTarget(program) \                             @@\
NormalProgramTarget(program,$(OBJS),$(CURRENTDEPLIBS),$(CURRENTLIBS),)
#endif /* NormalCVIPtoolsProgramTarget */

#ifndef CVIPtoolsProgramTarget
#define CVIPtoolsProgramTarget(program) \                                   @@\
NormalProgramTarget(program,program.o,$(CURRENTDEPLIBS),$(CURRENTLIBS),)
#endif /* CVIPtoolsProgramTarget */

#ifndef NormalCVIPtoolsObjectRule
#define NormalCVIPtoolsObjectRule() NormalLibraryObjectRule()
#endif
