#
#	Simple MS VC++ Makefile
#
#	To build:
#       C:\libtiff\libtiff> nmake /f makefile.vc all
#

# 
# Select _CONSOLE to build a library which reports errors to stderr, or
# _WINDOWED to build such that errors are reported via MessageBox().
#
WINMODE = -DTIF_PLATFORM_CONSOLE
#WINMODE = -DTIF_PLATFORM_WINDOWED

CC      = cl
INCL	= -I. 
LIBS    = 
CFLAGS  = /nologo /W3 $(INCL) $(WINMODE)

OBJ	= \
	tif_aux.obj \
	tif_close.obj \
	tif_codec.obj \
	tif_compress.obj \
	tif_dir.obj \
	tif_dirinfo.obj \
	tif_dirread.obj \
	tif_dirwrite.obj \
	tif_dumpmode.obj \
	tif_error.obj \
	tif_fax3.obj \
	fax3sm_winnt.obj \
	tif_getimage.obj \
	tif_jpeg.obj \
	tif_flush.obj \
	tif_luv.obj \
	tif_lzw.obj \
	tif_next.obj \
	tif_open.obj \
	tif_packbits.obj \
	tif_pixarlog.obj \
	tif_predict.obj \
	tif_print.obj \
	tif_read.obj \
	tif_swab.obj \
	tif_strip.obj \
	tif_thunder.obj \
	tif_tile.obj \
	tif_win32.obj \
	tif_version.obj \
	tif_warning.obj \
	tif_write.obj \
	tif_zip.obj

VERSION	= ..\VERSION
ALPHA = ..\dist\tiff.alpha

default:	libtiff.lib

all:	libtiff.lib libtiff.dll

libtiff.lib:	$(OBJ)
	lib /out:libtiff.lib $(OBJ)

libtiff.dll:	$(OBJ)
	link /dll /def:libtiff.def /out:libtiff.dll /implib:libtiff_i.lib \
		$(OBJ) $(LIBS)
	
version.h:	$(VERSION) $(ALPHA) mkversion.c
	$(CC) mkversion.c 
	del version.h
	.\mkversion.exe -v $(VERSION) -a $(ALPHA) version.h

clean:
	del *.obj *.lib libtiff.dll

tif_version.obj:	version.h


