diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-03-20 17:30:33 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-03-20 17:30:33 (GMT) |
commit | 54d971086f3a99dd7c9552fbe07f589f43bf439c (patch) | |
tree | 53969f74e5aef27e572e5db2af98a54b15e0a6a4 /tkimg/win/makefile.vc | |
parent | cfef685ad45bc8f98a2d59fba75ba9bc6e06496d (diff) | |
download | blt-54d971086f3a99dd7c9552fbe07f589f43bf439c.zip blt-54d971086f3a99dd7c9552fbe07f589f43bf439c.tar.gz blt-54d971086f3a99dd7c9552fbe07f589f43bf439c.tar.bz2 |
upgrade tkimg 1.4.9
Diffstat (limited to 'tkimg/win/makefile.vc')
-rwxr-xr-x | tkimg/win/makefile.vc | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/tkimg/win/makefile.vc b/tkimg/win/makefile.vc new file mode 100755 index 0000000..b5a9bd9 --- /dev/null +++ b/tkimg/win/makefile.vc @@ -0,0 +1,82 @@ +# This is the master makefile to build all tkimg components. Run as +# +# nmake /s /nologo /f makefile.vc INSTALLDIR=c:\full\path\to\installdir TCLDIR=c:\full\path\to\tcl\sources TKDIR=c:\full\path\to\tk\sources +# +# To build specific modules, pass the MODULES macro on the command line +# +# nmake /s /nologo /f makefile.vc INSTALLDIR=path\to\installdir TCLDIR=path\to\tcl\sources TKDIR=path\to\tk\sources MODULES="png jpeg" +# +# You may specify following additional targets: install, clean, hose, realclean. For example, to install +# +# nmake /s /nologo /f makefile.vc INSTALLDIR=path\to\installdir TCLDIR=path\to\tcl\sources TKDIR=path\to\tk\sources install + +!if !exist("makefile.vc") +!error You must run nmake from the directory containing this makefile. +!endif + +!if "$(TCLDIR)" == "" || "$(TKDIR)" == "" +!error You must define TCLDIR and TKDIR on the command line as paths to the Tcl and Tk source trees. +!endif + +# If relative paths are passed in, we need to convert them to absolute paths. +# Since nmake is so lame, we need to use nmakehlp for the purpose +!if [$(CC) -nologo "nmakehlp.c" -link -subsystem:console > nul] +!error Failed to compiler nmakehlp. +!endif +!if [echo TCLDIR = \> nmakehlp.out] \ + || [nmakehlp -Q "$(TCLDIR)" >> nmakehlp.out] +!error *** Could not fully qualify path TCLDIR="$(TCLDIR)" +!endif + +!if [echo TKDIR = \>> nmakehlp.out] \ + || [nmakehlp -Q "$(TKDIR)" >> nmakehlp.out] +!error *** Could not fully qualify path TKDIR="$(TKDIR)" +!endif + +!if [echo INSTALLDIR = \>> nmakehlp.out] \ + || [nmakehlp -Q "$(INSTALLDIR)" >> nmakehlp.out] +!error *** Could not fully qualify path INSTALLDIR="$(INSTALLDIR)" +!endif + +# We need to undef TCLDIR and TKDIR since macros passed on command line +# do not get overridden from within makefile definitions +!undef INSTALLDIR +!undef TCLDIR +!undef TKDIR +!include nmakehlp.out + +# Find out the main TKIMG_VERSION as we need it for the install directory +!if [echo TKIMG_VERSION = \> versions.vc] \ + || [nmakehlp -V ..\base\configure.in ^[tkimg^] >> versions.vc] +!error Could not determine tkimg base version. +!endif +!include versions.vc +TKIMG_INSTALL_SUBDIR = Img$(TKIMG_VERSION) + +ALLMODULES = bmp dted gif ico jpeg libjpeg libpng libtiff pcx pixmap png ppm \ + ps raw sgi sun tga tiff window xbm xpm zlib +!if "$(MODULES)" == "" +MODULES = $(ALLMODULES) +!endif + +all: $(MODULES) + +base $(ALLMODULES): .PHONY + echo Making $@ + cd ..\$@\win && $(MAKE) /$(MAKEFLAGS) /f makefile.vc $(TARGET) OPTS=$(OPTS) STATS=$(STATS) CHECKS=$(CHECKS) INSTALLDIR=$(INSTALLDIR) TCLDIR=$(TCLDIR) TKDIR=$(TKDIR) + +$(ALLMODULES): base +png: zlib libpng +jpeg: libjpeg +tiff: zlib libjpeg libtiff +libpng: zlib + +install: + $(MAKE) /$(MAKEFLAGS) /f makefile.vc TARGET=install OPTS=$(OPTS) STATS=$(STATS) CHECKS=$(CHECKS) INSTALLDIR=$(INSTALLDIR) TCLDIR=$(TCLDIR) TKDIR=$(TKDIR) TKIMG_INSTALL_SUBDIR=$(TKIMG_INSTALL_SUBDIR) + +clean hose realclean: .PHONY + $(MAKE) /$(MAKEFLAGS) /f makefile.vc TARGET=$@ OPTS=$(OPTS) STATS=$(STATS) CHECKS=$(CHECKS) INSTALLDIR=$(INSTALLDIR) TCLDIR=$(TCLDIR) TKDIR=$(TKDIR) + @del nmakehlp.out version*.vc nmakehlp.obj nmakehlp.exe + +.PHONY: + |