1# $Id: nmake.opt,v 1.20 2017-10-10 14:39:43 erouault Exp $
2#
3# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
4#
5# Permission to use, copy, modify, distribute, and sell this software and
6# its documentation for any purpose is hereby granted without fee, provided
7# that (i) the above copyright notices and this permission notice appear in
8# all copies of the software and related documentation, and (ii) the names of
9# Sam Leffler and Silicon Graphics may not be used in any advertising or
10# publicity relating to the software without the specific, prior written
11# permission of Sam Leffler and Silicon Graphics.
12#
13# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16#
17# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
18# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
19# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22# OF THIS SOFTWARE.
23
24# Compile time parameters for MS Visual C++ compiler.
25# You may edit this file to specify building options.
26
27# Options:
28#    DEBUG - set to disable optimizations and link with debug runtimes
29#
30# Usage examples (see details below):
31# nmake -f makefile.vc
32# nmake -f makefile.vc DEBUG=1
33#
34#
35###### Edit the following lines to choose a feature set you need. #######
36#
37
38#
39# Select WINMODE_CONSOLE to build a library which reports errors to stderr, or
40# WINMODE_WINDOWED to build such that errors are reported via MessageBox().
41#
42WINMODE_CONSOLE = 1
43#WINMODE_WINDOWED = 1
44
45#
46# Comment out the following lines to disable internal codecs.
47#
48# Support for CCITT Group 3 & 4 algorithms
49CCITT_SUPPORT	= 1
50# Support for Macintosh PackBits algorithm
51PACKBITS_SUPPORT = 1
52# Support for LZW algorithm
53LZW_SUPPORT	= 1
54# Support for ThunderScan 4-bit RLE algorithm
55THUNDER_SUPPORT	= 1
56# Support for NeXT 2-bit RLE algorithm
57NEXT_SUPPORT	= 1
58# Support for LogLuv high dynamic range encoding
59LOGLUV_SUPPORT	= 1
60
61#
62# Uncomment and edit following lines to enable JPEG support.
63#
64#JPEG_SUPPORT	= 1
65#JPEGDIR 	= d:/projects/jpeg-6b
66#JPEG_INCLUDE	= -I$(JPEGDIR)
67#JPEG_LIB 	= $(JPEGDIR)/Release/jpeg.lib
68
69#
70# Uncomment and edit following lines to enable ZIP support
71# (required for Deflate compression and Pixar log-format)
72#
73#ZIP_SUPPORT	= 1
74#ZLIBDIR 	= d:/projects/zlib-1.2.1
75#ZLIB_INCLUDE	= -I$(ZLIBDIR)
76#ZLIB_LIB 	= $(ZLIBDIR)/zlib.lib
77
78#
79# Uncomment and edit following lines to enable ISO JBIG support
80#
81#JBIG_SUPPORT	= 1
82#JBIGDIR 	= d:/projects/jbigkit
83#JBIG_INCLUDE	= -I$(JBIGDIR)/libjbig
84#JBIG_LIB 	= $(JBIGDIR)/libjbig/jbig.lib
85
86#
87# Uncomment following line to enable Pixar log-format algorithm
88# (Zlib required).
89#
90#PIXARLOG_SUPPORT = 1
91
92#
93# Comment out the following lines to disable strip chopping
94# (whether or not to convert single-strip uncompressed images to mutiple
95# strips of specified size to reduce memory usage). Default strip size
96# is 8192 bytes, it can be configured via the STRIP_SIZE_DEFAULT parameter
97#
98STRIPCHOP_SUPPORT = 1
99STRIP_SIZE_DEFAULT = 8192
100
101#
102# Comment out the following lines to disable treating the fourth sample with
103# no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA
104# files but don't mark the alpha properly.
105#
106EXTRASAMPLE_AS_ALPHA_SUPPORT = 1
107
108#
109# Comment out the following lines to disable picking up YCbCr subsampling
110# info from the JPEG data stream to support files lacking the tag.
111# See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details.
112#
113CHECK_JPEG_YCBCR_SUBSAMPLING = 1
114
115#
116####################### Compiler related options. #######################
117#
118
119#
120# Pick debug or optimized build flags.  We default to an optimized build
121# with no debugging information.
122# NOTE: /EHsc option required if you want to build the C++ stream API
123#
124!IFDEF DEBUG
125OPTFLAGS =	/MDd /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE
126!ELSE
127OPTFLAGS =	/Ox /MD /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE
128!ENDIF
129#OPTFLAGS = 	/Zi
130
131#
132# Uncomment following line to enable using Windows Common RunTime Library
133# instead of Windows specific system calls. See notes on top of tif_unix.c
134# module for details.
135#
136USE_WIN_CRT_LIB = 1
137
138# Compiler specific options. You may probably want to adjust compilation
139# parameters in CFLAGS variable. Refer to your compiler documentation
140# for the option reference.
141#
142MAKE	=	nmake /nologo
143CC	=	cl /nologo
144CXX	=	cl /nologo
145AR	=	lib /nologo
146LD	=	link /nologo
147
148CFLAGS  =	$(OPTFLAGS) $(INCL) $(EXTRAFLAGS)
149CXXFLAGS =	$(OPTFLAGS) $(INCL) $(EXTRAFLAGS)
150EXTRAFLAGS =
151LIBS	=
152
153# Name of the output shared library
154DLLNAME	= libtiff.dll
155
156#
157########### There is nothing to edit below this line normally. ###########
158#
159
160# Set the native cpu bit order
161EXTRAFLAGS	= -DFILLODER_LSB2MSB $(EXTRAFLAGS)
162
163!IFDEF WINMODE_WINDOWED
164EXTRAFLAGS	= -DTIF_PLATFORM_WINDOWED $(EXTRAFLAGS)
165LIBS		= user32.lib $(LIBS)
166!ELSE
167EXTRAFLAGS	= -DTIF_PLATFORM_CONSOLE $(EXTRAFLAGS)
168!ENDIF
169
170# Codec stuff
171!IFDEF CCITT_SUPPORT
172EXTRAFLAGS	= -DCCITT_SUPPORT $(EXTRAFLAGS)
173!ENDIF
174
175!IFDEF PACKBITS_SUPPORT
176EXTRAFLAGS	= -DPACKBITS_SUPPORT $(EXTRAFLAGS)
177!ENDIF
178
179!IFDEF LZW_SUPPORT
180EXTRAFLAGS	=  -DLZW_SUPPORT $(EXTRAFLAGS)
181!ENDIF
182
183!IFDEF THUNDER_SUPPORT
184EXTRAFLAGS	= -DTHUNDER_SUPPORT $(EXTRAFLAGS)
185!ENDIF
186
187!IFDEF NEXT_SUPPORT
188EXTRAFLAGS	= -DNEXT_SUPPORT $(EXTRAFLAGS)
189!ENDIF
190
191!IFDEF LOGLUV_SUPPORT
192EXTRAFLAGS	= -DLOGLUV_SUPPORT $(EXTRAFLAGS)
193!ENDIF
194
195!IFDEF JPEG_SUPPORT
196LIBS		= $(LIBS) $(JPEG_LIB)
197EXTRAFLAGS	= -DJPEG_SUPPORT -DOJPEG_SUPPORT $(EXTRAFLAGS)
198!ENDIF
199
200!IFDEF ZIP_SUPPORT
201LIBS		= $(LIBS) $(ZLIB_LIB)
202EXTRAFLAGS	= -DZIP_SUPPORT $(EXTRAFLAGS)
203!IFDEF PIXARLOG_SUPPORT
204EXTRAFLAGS	= -DPIXARLOG_SUPPORT $(EXTRAFLAGS)
205!ENDIF
206!ENDIF
207
208!IFDEF JBIG_SUPPORT
209LIBS		= $(LIBS) $(JBIG_LIB)
210EXTRAFLAGS	= -DJBIG_SUPPORT $(EXTRAFLAGS)
211!ENDIF
212
213!IFDEF STRIPCHOP_SUPPORT
214EXTRAFLAGS	= -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=$(STRIP_SIZE_DEFAULT) $(EXTRAFLAGS)
215!ENDIF
216
217!IFDEF EXTRASAMPLE_AS_ALPHA_SUPPORT
218EXTRAFLAGS	= -DDEFAULT_EXTRASAMPLE_AS_ALPHA $(EXTRAFLAGS)
219!ENDIF
220
221!IFDEF CHECK_JPEG_YCBCR_SUBSAMPLING
222EXTRAFLAGS	= -DCHECK_JPEG_YCBCR_SUBSAMPLING $(EXTRAFLAGS)
223!ENDIF
224
225!IFDEF USE_WIN_CRT_LIB
226EXTRAFLAGS	= -DAVOID_WIN32_FILEIO $(EXTRAFLAGS)
227!ELSE
228EXTRAFLAGS	= -DUSE_WIN32_FILEIO $(EXTRAFLAGS)
229!ENDIF
230