From 0e2f667eee2a8402a0a4ea11c6820dab232ab4a3 Mon Sep 17 00:00:00 2001 From: petasis Date: Thu, 19 Apr 2012 11:17:46 +0000 Subject: Updated the Windows Makefile, after a patch from Dave Bodenstab --- Changelog | 4 ++++ win/Makefile | 66 +++++++++++++++++++++++++++++++++++++----------------------- 2 files changed, 45 insertions(+), 25 deletions(-) diff --git a/Changelog b/Changelog index 4ed7fb4..fba27ec 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +2012-04-19 Petasis George + * win/Makefile: Updated the Windows Makefile, after a patch from + Dave Bodenstab. + 2012-04-12 Petasis George TkDND 2.4 released. * library/tkdnd_unix.tcl: diff --git a/win/Makefile b/win/Makefile index ea8a394..d572d40 100644 --- a/win/Makefile +++ b/win/Makefile @@ -1,6 +1,6 @@ ############################################################################### ## -## Makefile.vc - Microsoft Visual C++ makefile +## Makefile - Microsoft Visual C++ makefile ## ############################################################################### @@ -9,15 +9,17 @@ ## ## Location of the Tcl installation: -TCL = C:\Program Files\Tcl -TCL_VERSION = 8.4 -TCL_VERSION_NO_DOTS = 84 -TKDND_VERSION = 2.2 -TKDND_VERSION_NO_DOTS = 22 +TCL = C:\Program Files\Tcl +TCL_VERSION = 8.5 # or 8.6 +TCL_VERSION_NO_DOTS = 85 # or 86 +MACHINE = I386 # or AMD64 + +TKDND_VERSION = 2.4 +TKDND_VERSION_NO_DOTS = 24 ## ## Usage: -## nmake -f Makefile.vc +## nmake -f Makefile ## ## @@ -32,32 +34,35 @@ Please `cd` to its location first. !endif ## Include directories: -INCDIR = -I"$(TCL)\include" \ - -I"$(TCL)\include$(TCL_VERSION)" +INCDIR = -I"$(TCL)\include" \ + -I"$(TCL)\include$(TCL_VERSION)" -## library directories: +## Library directories: LIBDIR = -libpath:"$(TCL)\lib" ## Declarations common to all compiler options: -cflags = -nologo -c -W3 -MT -EHsc -YX -FD -O2 -Op -Gs -LD \ - -D "WIN32" -D "NDEBUG" -D "_WINDOWS" -D "_MBCS" \ - -D "_USRDLL" -D "USE_TCL_STUBS" -D "USE_TK_STUBS" +cflags = -nologo -c -W3 -MT -EHsc -YX -FD -O2 -Op -Gs -LD \ + -D "WIN32" -D "NDEBUG" -D "_WINDOWS" -D "_MBCS" \ + -D "_USRDLL" -D "USE_TCL_STUBS" -D "USE_TK_STUBS" \ + -D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 \ + -D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1 \ + -D _CRT_SECURE_NO_WARNINGS ## Declarations common to all linker options -lflags = -nologo -machine:I386 -subsystem:windows -release \ - -opt:ref -opt:icf,3 -dll \ +lflags = -nologo -machine:$(MACHINE) -subsystem:windows -release \ + -opt:ref -opt:icf,3 -dll \ -incremental:no -nodefaultlib:"MSVCRT.LIB" -LIBS = kernel32.lib user32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib +LIBS = kernel32.lib user32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib -cc32 = $(CC) # built-in default. -link32 = link -lib32 = lib -MKDIR = mkdir -MV = move -CP = copy -RM = del -RMDIR = rmdir /S /Q +cc32 = $(CC) # built-in default. +link32 = link +lib32 = lib +MKDIR = mkdir +MV = move +CP = copy +RM = del +RMDIR = rmdir /S /Q all: $(cc32) $(cflags) $(INCDIR) TkDND_OleDND.cpp \ @@ -65,4 +70,15 @@ all: $(link32) $(lflags) $(LIBDIR) tclstub$(TCL_VERSION_NO_DOTS).lib \ tkstub$(TCL_VERSION_NO_DOTS).lib $(LIBS)\ TkDND_OleDND.obj -out:"..\libtkdnd$(TKDND_VERSION_NO_DOTS).dll" - $(RM) ..\*.exp ..\*.lib *.idb *.pch *.obj + $(RM) ..\*.exp *.idb *.pch *.obj + +install: + -$(MKDIR) /S "$(TCL)\lib\tkdnd$(TKDND_VERSION)" + $(CP) /Y ..\library\*.* "$(TCL)\lib\tkdnd$(TKDND_VERSION)" + $(CP) /Y ..\libtkdnd$(TKDND_VERSION_NO_DOTS).dll "$(TCL)\lib\tkdnd$(TKDND_VERSION)" + $(CP) /Y ..\libtkdnd$(TKDND_VERSION_NO_DOTS).lib "$(TCL)\lib\tkdnd$(TKDND_VERSION)\tkdnd$(TKDND_VERSION_NO_DOTS).lib" + + echo package ifneeded tkdnd $(TKDND_VERSION) \ + "source \{$$dir/tkdnd.tcl\}; \ + tkdnd::initialise \{$$dir\} libtkdnd$(TKDND_VERSION_NO_DOTS)[info sharedlibextension] tkdnd" >pkgIndex.tcl + $(MV) /Y pkgIndex.tcl "$(TCL)\lib\tkdnd$(TKDND_VERSION)" -- cgit v0.12