Permalink
Browse files

Makefile: Added proper CXXFLAGS for parsing large files

Parsing the 14 GB planet.osm.pbf fails without these flags.
  • Loading branch information...
Turbo87 committed Dec 10, 2011
1 parent fe3b92c commit c550a3f79df8cdf507845c872e79f00cf2b53a06
Showing with 6 additions and 5 deletions.
  1. +6 −5 Makefile
View
@@ -1,6 +1,7 @@
-CPP=g++
-CC=gcc
-CFLAGS=-O2 -Wall -Wredundant-decls
+CPP = g++
+
+CXXFLAGS = -ggdb -Wall -Wredundant-decls
+CXXFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
all: osm2shp
@@ -15,10 +16,10 @@ FILES = \
osm/point_database.o
osm2shp: $(FILES)
- $(CPP) $(CFLAGS) $+ -lexpat -lsqlite3 -lshp -lboost_iostreams $(LIB_PROTOBUF) $(LIB_SHAPE) -o $@
+ $(CPP) $(CXXFLAGS) $+ -lexpat -lsqlite3 -lshp -lboost_iostreams $(LIB_PROTOBUF) $(LIB_SHAPE) -o $@
%.o: %.cc
- $(CPP) $(CFLAGS) -c $< -o $@
+ $(CPP) $(CXXFLAGS) -c $< -o $@
clean:
rm -f $(FILES) osm2shp

0 comments on commit c550a3f

Please sign in to comment.