CC	=	@CC@
CXX	=	@CXX@
LD	=	@CXX@

CPPFLAGS = -DFRMT_mrsid @GDAL_INC@ @MRSID_FLAGS@ @MRSID_INCLUDE@ @GEOTIFF_INCLUDE@ @CPPFLAGS@ 
CXXFLAGS = -DFRMT_mrsid @CXX_WFLAGS@ @MRSID_INCLUDE@ @GEOTIFF_INCLUDE@ @CXX_PIC@ 

RANLIB		=	@RANLIB@
SO_EXT		=	@SO_EXT@
LD_SHARED	=	@LD_SHARED@

LIBS	=	@LIBS@

AUTOLOAD_DIR	=	@AUTOLOAD_DIR@

GLIBNAME =	gdal_MrSID.so

default:	$(GLIBNAME) 

install:	default
	install -d $(AUTOLOAD_DIR)
	cp $(GLIBNAME) $(AUTOLOAD_DIR)

clean:
	rm -f $(GLIBNAME) *.o 

distclean: clean
	rm -fr Makefile config.status config.log autom*.cache


$(GLIBNAME):	mrsiddataset.o mrsidstream.o
	$(LD_SHARED) mrsiddataset.o mrsidstream.o $(LIBS) -o $(GLIBNAME)

%.o:	%.cpp
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

