
OBJ	=	gribdataset.obj

GDAL_ROOT	=	..\..

!INCLUDE $(GDAL_ROOT)\nmake.opt

!IF DEFINED(PNG_LIB)
LINK_PNG	=	$(PNG_LIB)
!ELSE
LINK_PNG	=	..\png\libpng\*.obj
!ENDIF


default:	$(OBJ)
        cd degrib18 && $(MAKE) /f makefile.vc && cd ..
	xcopy /D  /Y *.obj ..\o

clean:
	-del *.obj
	-del degrib18\degrib\*.obj
	-del degrib18\g2clib-1.0.4\*.obj
	-del *.dll
	-del *.exp
	-del *.lib

plugin:	gdal_GRIB.dll

gdal_GRIB.dll: default
	link /dll $(LDEBUG) /out:gdal_GRIB.dll \
		$(OBJ) degrib18\degrib\*.obj degrib18\g2clib-1.0.4\*.obj \
		$(GDAL_ROOT)/gdal_i.lib $(LINK_PNG) ..\zlib\*.obj
