#----------------------------------------------------------------------
# Get all the standard definitions
#----------------------------------------------------------------------
!include ../include/common1.mak

#----------------------------------------------------------------------
# Modify or override the default definitions here.
#----------------------------------------------------------------------
CPP_DEFINES=$(CPP_DEFINES) /D "main"="Tcl_Main" \
	    /D "TB_EXPAND" /D "HAVE_UNISTD_H" /D HAVE_SYS_SELECT_H \
	    /D "POSTSCRIPT"

LINK_LIBS=tcl73.lib lxlib.lib user32.lib gdi32.lib wsock32.lib

#----------------------------------------------------------------------
# Create the final definitions as a combination of the modified
# definitions and our own.
#----------------------------------------------------------------------
!include ../include/common2.mak

#----------------------------------------------------------------------
# Define the objects that make up modules
#----------------------------------------------------------------------

# The order of these objects is optimized for precompiled header usage.
TK_OBJS = \
	$(DIR)\tkappini.obj \
	$(DIR)\tkcanvas.obj \
	$(DIR)\tkcanvps.obj \
	$(DIR)\tkcanvar.obj \
	$(DIR)\tkcanvbm.obj \
	$(DIR)\tkcanvli.obj \
	$(DIR)\tkcanvpo.obj \
	$(DIR)\tkcanvte.obj \
	$(DIR)\tkcanvwi.obj \
	$(DIR)\tkrectov.obj \
	$(DIR)\tktrig.obj \
	$(DIR)\tkbind.obj \
	$(DIR)\tkatom.obj \
	$(DIR)\tkcolor.obj \
	$(DIR)\tkerror.obj \
	$(DIR)\tkfocus.obj \
	$(DIR)\tkfont.obj \
	$(DIR)\tkgeomet.obj \
	$(DIR)\tkget.obj \
	$(DIR)\tkgrab.obj \
	$(DIR)\tkoption.obj \
	$(DIR)\tkpack.obj \
	$(DIR)\tkplace.obj \
	$(DIR)\tkselect.obj \
	$(DIR)\tkevent.obj \
	$(DIR)\tkcmds.obj \
	$(DIR)\tksendms.obj \
	$(DIR)\tkcursor.obj \
	$(DIR)\tkmain.obj \
	$(DIR)\tkbutton.obj \
	$(DIR)\tkentry.obj \
	$(DIR)\tkframe.obj \
	$(DIR)\tklistbo.obj \
	$(DIR)\tkmenu.obj \
	$(DIR)\tkmenubu.obj \
	$(DIR)\tkmessag.obj \
	$(DIR)\tkscale.obj \
	$(DIR)\tkscroll.obj \
	$(DIR)\tkbitmap.obj \
	$(DIR)\tk3d.obj \
	$(DIR)\tkargv.obj \
	$(DIR)\tkconfig.obj \
	$(DIR)\tkgc.obj \
	$(DIR)\tkpreser.obj \
	$(DIR)\tktextin.obj \
	$(DIR)\tktextbt.obj \
	$(DIR)\tktextdi.obj \
	$(DIR)\tktext.obj \
	$(DIR)\tktextta.obj \
	$(DIR)\tkwindow.obj \
	$(DIR)\tkwm.obj


COMPAT_OBJS = $(DIR)\print.obj \
	$(DIR)\tkwinuti.obj
#	$(DIR)\select.obj

LINK_OBJS= $(TK_OBJS) $(COMPAT_OBJS)

DEF_FILE=tk36.def
DEF_FLAGS=/DEF:$(DEF_FILE)

#----------------------------------------------------------------------
# Build rules
#----------------------------------------------------------------------
ALL: $(DIR)\tk36.dll

$(DIR)\tk36.dll:  $(DEF_FILE) $(LINK_OBJS)
	$(LINK) @<<
		$(LINK_FLAGS_DLL) $(DEF_FLAGS) $(LINK_OBJS) /IMPLIB:$(DIR)\tk36.lib /OUT:$(DIR)\tk36.dll
<<

tktest: $(DIR)\tktest.exe

$(DIR)\tktest.exe: $(DIR)\tktest.obj $(DIR)\tk36.lib $(DIR)\tkmain.obj \
		..\wish\$(DIR)\common_sh.obj ..\wish\$(DIR)\wish.obj
	$(LINK) $(LINK_FLAGS_CONSOLE) $(DIR)\tktest.obj $(DIR)\tkmain.obj \
		..\wish\$(DIR)\common_sh.obj ..\wish\$(DIR)\wish.obj \
		tk36.lib /OUT:$(DIR)\tktest.exe

ALL_OBJS=$(LINK_OBJS)
#----------------------------------------------------------------------
# Default build rules
#----------------------------------------------------------------------
!include "../include/common3.mak"
