
CC=cl $(CFLAGS)
CPP=cl /TP $(CFLAGS)

!IFDEF JS_DIR
JS_CFLAGS=-DXP_WIN -DUSE_JS -I$(JS_DIR)
JS_LDFLAGS=$(JS_DIR)/mozjs185-1.0.lib
JS_FILE=service_internal_js.obj
!ENDIF

!IFDEF MS_DIR
MS_CFLAGS=-DUSE_MS -I$(MS_DIR) /DNEED_STRCASESTR 
MS_LDFLAGS=$(MS_DIR)/mapserver_i.lib
MS_FILE=service_internal_ms.obj
!ENDIF

!IFDEF JDK_DIR
JAVA_CFLAGS=-DJAVA7 -DUSE_JAVA -I"$(JDK_DIR)\include" -I"$(JDK_DIR)\include\win32"
JAVA_LDFLAGS="$(JDK_DIR)/lib/jvm.lib"
JAVA_FILE=service_internal_java.obj
!ENDIF

!IFDEF PY_DIR
PY_CFLAGS=-DUSE_PYTHON -I$(PY_DIR)\Include -I$(PY_DIR)\PC
PY_LDFLAGS=$(PY_LIBRARY) 
PY_FILE=service_internal_python.obj
!ENDIF

!IFNDEF ZOOK_DIR
ZOOK_DIR=.
!ENDIF

TROOT=$(ZOOK_DIR)
TPATH=$(ZOOK_DIR)\..\..\..\tools
LIBINTL_CPATH=$(ZOOK_DIR)\..\..\..\
PYTHON_CPATH=$(ZOOK_DIR)\..\..\..\Python-2.7.3

CFLAGS=$(CFLAGS1) /nologo /MD /W3 /EHsc /O2 /D_CRT_SECURE_NO_WARNINGS /DWIN32 $(CJFLAGS) -I$(ZOOK_DIR) -I./ $(JAVA_CFLAGS) $(MS_CFLAGS) -I$(TROOT)\..\..\thirds\dirent-win32 -I$(INTL_DIR) -I$(CURL_DIR)\include -I$(XML2_DIR)\include -I$(GDAL_DIR)\port $(JS_CFLAGS) -I$(GDAL_DIR)\ogr -I$(GDAL_DIR)\gcore -I$(GD_DIR) -I$(ICONV_DIR) -I$(TROOT)\..\..\thirds\include -I$(TROOT)\..\..\thirds\cgic206 -I$(PYTHON_CPATH)\include -I$(SSL_DIR)/inc32 -I$(FCGI_DIR)\include $(PY_CFLAGS) -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF

LDFLAGS=$(FCGI_LIBRARY) $(CURL_LIBRARY) $(PY_LDFLAGS) $(XML2_LIBRARY) $(TROOT)/../../thirds/cgic206/libcgic.lib $(SSL_DIR)/out32dll/libeay32.lib $(JAVA_LDFLAGS) $(SSL_DIR)/out32dll/ssleay32.lib $(MS_LDFLAGS) $(INTL_DIR)/intl.lib $(XML2_DIR)/win32/bin.msvc/libxml2.lib $(GDAL_DIR)/gdal_i.lib $(CURL_DIR)/lib/libcurl.lib $(JS_LDFLAGS) /machine:i386
