TROOT= $(ZOOK_DIR)
!INCLUDE $(ZOOK_DIR)/nmake.opt

FILES=$(ZOOK_DIR)/service_internal.obj $(ZOOK_DIR)/ulinet.obj 
!IFDEF JS_DIR
FILES=$(FILES) $(ZOOK_DIR)$(JS_FILE)
!ENDIF
!IFDEF JDK_DIR
FILES=$(FILES) $(ZOOK_DIR)$(JAVA_FILE)
!ENDIF
!IFDEF PY_DIR
FILES=$(FILES) $(ZOOK_DIR)$(PY_FILE)
!ENDIF
!IFDEF MS_DIR
FILES=$(FILES) $(ZOOK_DIR)$(MS_FILE)
!ENDIF

cgi-env/ogr_service.zo: service.c
	$(CPP)  /D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DZOO_SERVICE -I$(GDAL_DIR)/frmts/ $(CFLAGS) /c service.c
	link /dll /out:cgi-env/ogr_service.zo  $(FILES) ./service.obj $(LDFLAGS) $(GEOS_DIR)/src/geos_c_i.lib /FORCE:MULTIPLE

clean:
	erase cgi-env\ogr_service.*

#	link /dll /out:cgi-env/ogr_service.zo ../../../zoo-kernel/service_internal.obj ./service.obj -L$(TOOLS)/lib/libssl32.dll.a $(GEODIR)/lib/libxml2.lib $(GEODIR)/lib/gdal_i.lib $(GEODIR)/lib/geos_c_i.lib $(TPATH)/lib/libeay32.dll.a $(TPATH)/lib/libcrypto.a $(TPATH)/lib/libssl32.dll.a $(LIBINTL_CPATH)/lib/libintl.lib 
