#------------------------------------------------------------- -*- makefile -*-
#
# Makefile
#
# Basic build, test and install
#   nmake /f makefile.vc INSTALLDIR=c:\tcl TCLDIR=c:\path\to\tcl\sources TKDIR=c:\path\to\tk\sources
#   nmake /f makefile.vc INSTALLDIR=c:\tcl test TCLDIR=c:\path\to\tcl\sources TKDIR=c:\path\to\tk\sources
#   nmake /f makefile.vc INSTALLDIR=c:\tcl install TCLDIR=c:\path\to\tcl\sources TKDIR=c:\path\to\tk\sources
# Note this extension needs both Tcl and Tk *source* to build.
#
# For other build options (debug, static etc.),
# See TIP 477 (https://core.tcl.tk/tips/doc/trunk/tip/477.md) for
# detailed documentation.
# 
#------------------------------------------------------------------------------


PROJECT = tifftcl

NEED_TK_SOURCE = 1
NEED_TCL_SOURCE = 1
COMPATDIR = ..\..\compat\libtiff\libtiff
!include "..\..\win\rules-ext.vc"

PRJ_OBJS	= \
	$(TMP_DIR)\tifftcl.obj \
	$(TMP_DIR)\tifftclStubInit.obj \
	$(TMP_DIR)\tif_aux.obj \
	$(TMP_DIR)\tif_close.obj \
	$(TMP_DIR)\tif_codec.obj \
	$(TMP_DIR)\tif_compress.obj \
	$(TMP_DIR)\tif_dir.obj \
	$(TMP_DIR)\tif_dirinfo.obj \
	$(TMP_DIR)\tif_dirread.obj \
	$(TMP_DIR)\tif_dirwrite.obj \
	$(TMP_DIR)\tif_dumpmode.obj \
	$(TMP_DIR)\tif_error.obj \
	$(TMP_DIR)\tif_fax3.obj \
	$(TMP_DIR)\tif_getimage.obj \
	$(TMP_DIR)\tif_flush.obj \
	$(TMP_DIR)\tif_luv.obj \
	$(TMP_DIR)\tif_lzw.obj \
	$(TMP_DIR)\tif_next.obj \
	$(TMP_DIR)\tif_open.obj \
	$(TMP_DIR)\tif_packbits.obj \
	$(TMP_DIR)\tif_predict.obj \
	$(TMP_DIR)\tif_print.obj \
	$(TMP_DIR)\tif_read.obj \
	$(TMP_DIR)\tif_swab.obj \
	$(TMP_DIR)\tif_strip.obj \
	$(TMP_DIR)\tif_thunder.obj \
	$(TMP_DIR)\tif_tile.obj \
	$(TMP_DIR)\tif_version.obj \
	$(TMP_DIR)\tif_warning.obj \
	$(TMP_DIR)\tif_write.obj \
	$(TMP_DIR)\tif_color.obj \
	$(TMP_DIR)\tif_extension.obj \
	$(TMP_DIR)\tifftclStubLib.obj \
	$(TMP_DIR)\tif_win32.obj \
	$(TMP_DIR)\tif_fax3sm.obj

PRJ_STUBOBJS = $(TMP_DIR)\tifftclStubLib.obj
PRJ_INCLUDES = $(PRJ_INCLUDES) -I"$(TMP_DIR)" 
PRJ_DEFINES  = $(PRJ_DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -DTIFFTCLAPI=MODULE_SCOPE -wd4267 -wd4244 -DHAVE_SNPRINTF -DTIFF_DISABLE_DEPRECATED

!include "..\..\win\install-lib.vc"

$(PRJ_OBJS): $(TMP_DIR)\tiffconf.h $(TMP_DIR)\tif_config.h
$(TMP_DIR)\tiffconf.h: $(COMPATDIR)\tiffconf.vc.h
	$(COPY) $** "$@"
$(TMP_DIR)\tif_config.h: $(COMPATDIR)\tif_config.vc.h
	$(COPY) $** "$@"


