#
# CPL (Common Portability Library) makefile for MSVC
#

OBJ	=	cpl_conv.obj \
		cpl_error.obj \
		cpl_string.obj \
		cplstring.obj \
		cpl_strtod.obj \
		cpl_vsisimple.obj \
		cplgetsymbol.obj \
		cpl_path.obj \
		cpl_csv.obj \
		cpl_findfile.obj \
		cpl_vsil_win32.obj \
		cpl_minixml.obj \
		cpl_multiproc.obj \
		cpl_list.obj \
		cpl_getexecpath.obj \
		cpl_vsil.obj \
		cpl_vsi_mem.obj \
                cpl_http.obj \
                cpl_hash_set.obj \
                cplkeywordparser.obj \
		cpl_recode_stub.obj \
		cpl_quad_tree.obj \
		cpl_vsil_gzip.obj \
		cpl_minizip_ioapi.obj \
		cpl_minizip_unzip.obj \
		cpl_minizip_zip.obj \
		cpl_vsil_subfile.obj \
		cpl_atomic_ops.obj \
		cpl_time.obj \
		cpl_vsil_stdout.obj \
		cpl_vsil_sparsefile.obj \
		cpl_vsil_abstract_archive.obj \
		cpl_vsil_tar.obj \
		cpl_vsil_curl.obj \
		cpl_vsil_stdin.obj \
		cpl_vsil_buffered_reader.obj \
		cpl_base64.obj \
		$(ODBC_OBJ)

LIB	=	cpl.lib

GDAL_ROOT = ..

!INCLUDE ..\nmake.opt

EXTRAFLAGS	= 	 -I..\frmts\zlib -DHAVE_LIBZ

!IFDEF CURL_INC
EXTRAFLAGS =	$(EXTRAFLAGS) -DHAVE_CURL $(CURL_CFLAGS) $(CURL_INC)
!ENDIF

!IFDEF ODBC_SUPPORTED
ODBC_OBJ =	cpl_odbc.obj
!ENDIF

default:	cpl_config.h $(LIB)

$(LIB):	$(OBJ)
	lib /out:cpl.lib *.obj

clean:
	-del *.obj *.lib

cpl_config.h:	cpl_config.h.vc
	copy cpl_config.h.vc cpl_config.h


