1 | |
---|
2 | CC = /usr/bin/gcc-4.2 |
---|
3 | CXX = /usr/bin/g++-4.2 |
---|
4 | LD = /usr/bin/g++-4.2 |
---|
5 | |
---|
6 | CPPFLAGS = -DUSE_CPL -DGRASS_GISBASE=\"/opt/local/share/grass-6.4.0\" \ |
---|
7 | -I/opt/local/include -I/opt/local/share/grass-6.4.0/include -I/opt/local/include |
---|
8 | CXXFLAGS = -Wall -fPIC |
---|
9 | |
---|
10 | RANLIB = ranlib |
---|
11 | SO_EXT = dylib |
---|
12 | LD_SHARED = /usr/bin/g++-4.2 -dynamiclib |
---|
13 | |
---|
14 | LIBS = -L/opt/local/share/grass-6.4.0/lib -lgrass_I -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dgl -lgrass_dig2 -lgrass_rtree -lgrass_linkm -L/opt/local/lib -lgdal |
---|
15 | |
---|
16 | GRASSTABLES_DIR = /opt/local/share/gdal/grass |
---|
17 | |
---|
18 | AUTOLOAD_DIR = /opt/local/lib/gdalplugins |
---|
19 | |
---|
20 | GLIBNAME = gdal_GRASS.so |
---|
21 | OLIBNAME = ogr_GRASS.so |
---|
22 | |
---|
23 | default: $(GLIBNAME) $(OLIBNAME) |
---|
24 | |
---|
25 | install: default |
---|
26 | install -d $(AUTOLOAD_DIR) |
---|
27 | cp $(GLIBNAME) $(AUTOLOAD_DIR) |
---|
28 | cp $(OLIBNAME) $(AUTOLOAD_DIR) |
---|
29 | test -d ${GRASSTABLES_DIR} || mkdir ${GRASSTABLES_DIR} |
---|
30 | test -d ${GRASSTABLES_DIR}/etc || mkdir ${GRASSTABLES_DIR}/etc |
---|
31 | cp /opt/local/share/grass-6.4.0/etc/ellipse.table ${GRASSTABLES_DIR}/etc |
---|
32 | cp /opt/local/share/grass-6.4.0/etc/datum.table /opt/local/share/grass-6.4.0/etc/datumtransform.table ${GRASSTABLES_DIR}/etc |
---|
33 | test -d ${GRASSTABLES_DIR}/driver || mkdir ${GRASSTABLES_DIR}/driver |
---|
34 | test -d ${GRASSTABLES_DIR}/driver/db || mkdir ${GRASSTABLES_DIR}/driver/db |
---|
35 | cp -r /opt/local/share/grass-6.4.0/driver/db/* ${GRASSTABLES_DIR}/driver/db/ |
---|
36 | |
---|
37 | clean: |
---|
38 | rm -f $(OLIBNAME) $(GLIBNAME) *.o |
---|
39 | |
---|
40 | distclean: clean |
---|
41 | rm -fr Makefile config.status config.log autom*.cache |
---|
42 | |
---|
43 | |
---|
44 | $(GLIBNAME): grass57dataset.o |
---|
45 | $(LD_SHARED) grass57dataset.o $(LIBS) -o $(GLIBNAME) |
---|
46 | |
---|
47 | $(OLIBNAME): ogrgrassdriver.o ogrgrassdatasource.o ogrgrasslayer.o |
---|
48 | $(LD_SHARED) ogrgrassdriver.o ogrgrassdatasource.o ogrgrasslayer.o $(LIBS) -o $(OLIBNAME) |
---|
49 | |
---|
50 | %.o: %.cpp |
---|
51 | $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< |
---|
52 | |
---|