### DEFINITIONS

PYTHONVERSION=@PYVERSION@

### END DEFINITIONS

MODULE_TOPDIR = ../..

include $(MODULE_TOPDIR)/include/Make/Lib.make
include $(MODULE_TOPDIR)/include/Make/Doxygen.make
SWIG=swig

GRASS_LIB_PATH=$(ARCH_LIBDIR)
CFLAGS=-c -fpic -I/usr/include/python$(PYTHONVERSION) -I./ 

LDFLAGS=-shared $(GRASS_LIB_PATH)/libgrass_D.so $(GRASS_LIB_PATH)/libgrass_I.so $(GRASS_LIB_PATH)/libgrass_Iortho.so $(GRASS_LIB_PATH)/libgrass_bitmap.so $(GRASS_LIB_PATH)/libgrass_btree.so $(GRASS_LIB_PATH)/libgrass_cdhc.so $(GRASS_LIB_PATH)/libgrass_datetime.so $(GRASS_LIB_PATH)/libgrass_dbmibase.so $(GRASS_LIB_PATH)/libgrass_dbmiclient.so $(GRASS_LIB_PATH)/libgrass_dbmidriver.so $(GRASS_LIB_PATH)/libgrass_dbstubs.so $(GRASS_LIB_PATH)/libgrass_dgl.so $(GRASS_LIB_PATH)/libgrass_display.so $(GRASS_LIB_PATH)/libgrass_dspf.so $(GRASS_LIB_PATH)/libgrass_edit.so $(GRASS_LIB_PATH)/libgrass_form.so $(GRASS_LIB_PATH)/libgrass_g3d.so $(GRASS_LIB_PATH)/libgrass_gis.so $(GRASS_LIB_PATH)/libgrass_gmath.so $(GRASS_LIB_PATH)/libgrass_gproj.so $(GRASS_LIB_PATH)/libgrass_interpdata.so $(GRASS_LIB_PATH)/libgrass_interpfl.so $(GRASS_LIB_PATH)/libgrass_linkm.so $(GRASS_LIB_PATH)/libgrass_qtree.so $(GRASS_LIB_PATH)/libgrass_raster.so $(GRASS_LIB_PATH)/libgrass_rowio.so $(GRASS_LIB_PATH)/libgrass_rtree.so $(GRASS_LIB_PATH)/libgrass_segment.so $(GRASS_LIB_PATH)/libgrass_shape.so $(GRASS_LIB_PATH)/libgrass_sites.so $(GRASS_LIB_PATH)/libgrass_symb.so $(GRASS_LIB_PATH)/libgrass_trans.so $(GRASS_LIB_PATH)/libgrass_vask.so $(GRASS_LIB_PATH)/libgrass_vect.so

default: python_grass6.so

clean:
	-rm -f *.o *.so python_grass6_wrap.c python_grass6.pyc python_grass6.py

python_grass6_wrap.c: python_grass6.i
	$(SWIG) -python -shadow $<


python_grass6_wrap.o: python_grass6_wrap.c
	$(CC) $(CFLAGS) $(INCLUDE_DIRS) $<

python_grass6.so: python_grass6_wrap.o
	$(LD) $(LDFLAGS) $< -o _python_grass6.so

# doxygen:
DOXNAME=
DOXINPUT=grasspython.dox
