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

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

PRJ_OBJS	=  \
	$(TMP_DIR)\jpegtcl.obj \
	$(TMP_DIR)\jpegtclStubInit.obj \
	$(TMP_DIR)\jcapimin.obj \
	$(TMP_DIR)\jcapistd.obj \
	$(TMP_DIR)\jccoefct.obj \
	$(TMP_DIR)\jccolor.obj \
	$(TMP_DIR)\jcdctmgr.obj \
	$(TMP_DIR)\jchuff.obj \
	$(TMP_DIR)\jcinit.obj \
	$(TMP_DIR)\jcmainct.obj \
	$(TMP_DIR)\jcmarker.obj \
	$(TMP_DIR)\jcmaster.obj \
	$(TMP_DIR)\jcomapi.obj \
	$(TMP_DIR)\jcparam.obj \
	$(TMP_DIR)\jcarith.obj \
	$(TMP_DIR)\jcprepct.obj \
	$(TMP_DIR)\jcsample.obj \
	$(TMP_DIR)\jctrans.obj \
	$(TMP_DIR)\jdapimin.obj \
	$(TMP_DIR)\jdapistd.obj \
	$(TMP_DIR)\jdatadst.obj \
	$(TMP_DIR)\jdatasrc.obj \
	$(TMP_DIR)\jdcoefct.obj \
	$(TMP_DIR)\jdcolor.obj \
	$(TMP_DIR)\jddctmgr.obj \
	$(TMP_DIR)\jdhuff.obj \
	$(TMP_DIR)\jdinput.obj \
	$(TMP_DIR)\jdmainct.obj \
	$(TMP_DIR)\jdmarker.obj \
	$(TMP_DIR)\jdmaster.obj \
	$(TMP_DIR)\jdmerge.obj \
	$(TMP_DIR)\jdarith.obj \
	$(TMP_DIR)\jdpostct.obj \
	$(TMP_DIR)\jdsample.obj \
	$(TMP_DIR)\jdtrans.obj \
	$(TMP_DIR)\jerror.obj \
	$(TMP_DIR)\jfdctflt.obj \
	$(TMP_DIR)\jfdctfst.obj \
	$(TMP_DIR)\jfdctint.obj \
	$(TMP_DIR)\jidctflt.obj \
	$(TMP_DIR)\jidctfst.obj \
	$(TMP_DIR)\jidctint.obj \
	$(TMP_DIR)\jaricom.obj \
	$(TMP_DIR)\jquant1.obj \
	$(TMP_DIR)\jquant2.obj \
	$(TMP_DIR)\jutils.obj \
	$(TMP_DIR)\jmemmgr.obj \
	$(TMP_DIR)\jmemansi.obj \
	$(TMP_DIR)\jpegtclStubLib.obj

PRJ_STUBOBJS = $(TMP_DIR)\jpegtclStubLib.obj
PRJ_INCLUDES = -I"$(TMP_DIR)"
PRJ_DEFINES  =  -DJPEGTCLAPI=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) $** "$@"
