#------------------------------------------------------------- -*- 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 = zlibtcl

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

PRJ_OBJS	=  \
	$(TMP_DIR)\zlibtcl.obj \
	$(TMP_DIR)\zlibtclStubInit.obj \
	$(TMP_DIR)\adler32.obj \
	$(TMP_DIR)\compress.obj \
	$(TMP_DIR)\crc32.obj \
	$(TMP_DIR)\deflate.obj \
	$(TMP_DIR)\gzclose.obj \
	$(TMP_DIR)\gzlib.obj \
	$(TMP_DIR)\gzread.obj \
	$(TMP_DIR)\gzwrite.obj \
	$(TMP_DIR)\infback.obj \
	$(TMP_DIR)\inffast.obj \
	$(TMP_DIR)\inflate.obj \
	$(TMP_DIR)\inftrees.obj \
	$(TMP_DIR)\trees.obj \
	$(TMP_DIR)\uncompr.obj \
	$(TMP_DIR)\zutil.obj \
	$(TMP_DIR)\zlibtclStubLib.obj

PRJ_STUBOBJS = $(TMP_DIR)\zlibtclStubLib.obj
PRJ_INCLUDES = -I"$(TMP_DIR)"
PRJ_DEFINES  =  -DZEXTERN=MODULE_SCOPE -D_CRT_SECURE_NO_WARNINGS

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

$(PRJ_OBJS): $(TMP_DIR)\jconfig.h
$(TMP_DIR)\jconfig.h: ..\..\compat\libjpeg\jconfig.vc
	$(COPY) $** "$@"
