
GDAL_OBJ	=	nitfdataset.obj rpftocdataset.obj nitfwritejpeg.obj nitfwritejpeg_12.obj
NITFLIB_OBJ	=	nitffile.obj nitfimage.obj mgrs.obj nitfaridpcm.obj \
			nitfbilevel.obj rpftocfile.obj nitfdes.obj

OBJ = $(GDAL_OBJ) $(NITFLIB_OBJ)

GDAL_ROOT	=	..\..

!INCLUDE $(GDAL_ROOT)\nmake.opt

!IFDEF JPEG_SUPPORTED
!IFDEF JPEG_EXTERNAL_LIB
JPEG_FLAGS =	-I$(JPEGDIR) -DJPEG_SUPPORTED
!ELSE
JPEG_FLAGS =	-I..\jpeg\libjpeg -DJPEG_SUPPORTED
!ENDIF
!ENDIF

!IFDEF JPEG12_SUPPORTED
JPEG12_FLAGS =  -DJPEG_DUAL_MODE_8_12
!ENDIF
 	
EXTRAFLAGS = -I..\gtiff\libtiff -I..\vrt $(JPEG_FLAGS) $(JPEG12_FLAGS)

default:	$(OBJ)
	xcopy /D  /Y *.obj ..\o

clean:
	-del *.obj

nitfdump.exe:	nitfdump.c $(NITFLIB_OBJ)
	$(CC) $(CFLAGS) nitfdump.c $(GDALLIB)
	if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
	del nitfdump.obj
