/*
$Id: TIFF.def,v 1.3 1997/02/19 16:29:54 bmarsch Exp $

$Log: TIFF.def,v $
Revision 1.3  1997/02/19 16:29:54  bmarsch
Bugfix in shared object rule


Revision 1.2  1996/11/20 10:00:30  bmarsch
Rule for shared object (MakeTIFFSHaredObjectRule)

Revision 1.1  1995/11/13 09:51:20  hleitner
Initial revision

*/

/*
 * Use any X11 parameters that are defined in the platform-specific .cf file.
 */
#if defined(CcCmd) && !defined(TIFFCDriver)
#define TIFFCDriver CcCmd
#endif

#if defined(OptimizedCDebugFlags) && !defined(TIFFOptimizeCFlags)
#define TIFFOptimizeCFlags OptimizedCDebugFlags
#endif

#if defined(DefaultCCOptions) && !defined(TIFFExtraCFlags)
#define TIFFExtraCFlags DefaultCCOptions
#endif

#if defined(StandardDefines) && !defined(TIFFExtraCDefines)
#define TIFFExtraCDefines StandardDefines
#endif

#if defined(StandardIncludes) && !defined(TIFFExtraCIncludes)
#define TIFFExtraCIncludes StandardIncludes
#endif

#if defined(ExtraLoadFlags) && !defined(TIFFExtraCLdFlags)
#define TIFFExtraCLdFlags ExtraLoadFlags
#endif

#if defined(ExtraLibraries) && !defined(TIFFExtraCLdLibs)
#define TIFFExtraCLdLibs ExtraLibraries
#endif

/*****************************************************************************/

/*
 * Define how to compile a TIFF file with the C driver.
 */
#ifndef TIFFCDriver
#define TIFFCDriver $(CC)
#endif

        TIFF_CDRIVER = TIFFCDriver

/*
 * Define all the flags passed to the C driver when we compile a TIFF file.
 */
#ifndef TIFFCFlags
#define TIFFCFlags $(TIFF_STD_CFLAGS) $(TIFF_EXTRA_CFLAGS)
#endif

#ifndef TIFFStdCFlags
#define TIFFStdCFlags \							@@\
	$(TIFF_CDEFINES)\						@@\
	$(TIFF_CINCLUDES)
#endif

#ifndef TIFFOptimizeCFlags
#define TIFFOptimizeCFlags -O
#endif

#ifndef TIFFSharedCFlags
#define TIFFSharedCFlags $(SHARED_CCFLAGS)
#endif

#ifndef TIFFExtraCFlags
#define TIFFExtraCFlags /**/
#endif

         TIFF_CFLAGS = TIFFCFlags
     TIFF_STD_CFLAGS = TIFFStdCFlags
  TIFF_SHARED_CFLAGS = TIFFSharedCFlags
   TIFF_EXTRA_CFLAGS = TIFFExtraCFlags
/* Imakefile's decision whether to use */
TIFF_OPTIMIZE_CFLAGS = TIFFOptimizeCFlags

/*
 * Define the defines passed to the C driver when we compile a TIFF file.
 */
#ifndef TIFFCDefines
#define TIFFCDefines $(TIFF_STD_CDEFINES) $(TIFF_EXTRA_CDEFINES)
#endif

#ifndef TIFFStdCDefines
#if defined(SGIArchitecture) || defined(NeXTArchitecture)
#define TIFFStdCDefines -DUSE_VARARGS=0 -DUSE_PROTOTYPES=1 -prototypes
#else
#define TIFFStdCDefines -DUSE_VARARGS=1 -DUSE_PROTOTYPES=0
#endif
#endif

#ifndef TIFFExtraCDefines
#if SystemV
#define TIFFExtraCDefines -DSYSV
#else
#if SystemV4
#define TIFFExtraCDefines -DSVR4
#else
#define TIFFExtraCDefines /**/
#endif
#endif
#endif

/*
 * Options you might want:
 *
 *	-DPACKBITS_SUPPORT
 *	-DLZW_SUPPORT
 *	-DCCITT_SUPPORT
 *	-DTHUNDER_SUPPORT
 *	-DNEXT_SUPPORT
 */
#ifndef TIFFCompressionCDefines
#define TIFFCompressionCDefines \					@@\
	-DPACKBITS_SUPPORT\						@@\
	-DLZW_SUPPORT
#endif

       TIFF_CDEFINES = TIFFCDefines
   TIFF_STD_CDEFINES = TIFFStdCDefines
 TIFF_EXTRA_CDEFINES = TIFFExtraCDefines
TIFF_CPRESS_CDEFINES = TIFFCompressionCDefines

/*
 * Define the includes passed to the C driver when we compile a TIFF file.
 */
#ifndef TIFFCIncludes
#define TIFFCIncludes $(TIFF_STD_CINCLUDES) $(TIFF_EXTRA_CINCLUDES)
#endif

#ifndef TIFFStdCIncludes
#define TIFFStdCIncludes -I$(INCSRC)/TIFF
#endif

#ifndef TIFFExtraCIncludes
#define TIFFExtraCIncludes /**/
#endif

      TIFF_CINCLUDES = TIFFCIncludes
  TIFF_STD_CINCLUDES = TIFFStdCIncludes
TIFF_EXTRA_CINCLUDES = TIFFExtraCIncludes

/*
 * Define all the flags passed to the C driver when we link a TIFF program.
 */
#ifndef TIFFCLdFlags
#define TIFFCLdFlags\
 $(TIFF_CFLAGS) $(TIFF_EXTRA_CLDFLAGS) $(TIFF_EXTRA_CLDLIBS)
#endif

#ifndef TIFFExtraCLdFlags
#define TIFFExtraCLdFlags /**/
#endif

#ifndef TIFFExtraCLdLibs
#define TIFFExtraCLdLibs /**/
#endif

       TIFF_CLDFLAGS = TIFFCLdFlags
 TIFF_EXTRA_CLDFLAGS = TIFFExtraCLdFlags
  TIFF_EXTRA_CLDLIBS = TIFFExtraCLdLibs

/*
 * Make a TIFF object file.
 */
#ifndef MakeTIFFCObjectRule
#define MakeTIFFCObjectRule(dst,src,flags)				@@\
$(AOUT): dst.o								@@\
dst.o: src.c								@@\
	@$(RM) dst.o							@@\
	$(TIFF_CDRIVER) $(TIFF_CFLAGS) flags -c src.c
#endif

#ifndef MakeTIFFCSharedObjectRule
#ifndef HaveShared
#define MakeTIFFCSharedObjectRule(dst,src,flags)
#else
#define MakeTIFFCSharedObjectRule(dst,src,flags)			@@\
$(AOUT_SH): shared/dst.o						@@\
shared/dst.o: src.c							@@\
	@$(RM) shared/dst.o						@@\
	$(TIFF_CDRIVER) $(TIFF_SHARED_CFLAGS) $(TIFF_CFLAGS) flags -c src.c -o shared/dst.o
#endif
#endif
