forked from woodpeck/osmium_based_utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (42 loc) · 1.44 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#------------------------------------------------------------------------------
#
# Makefile for Osmium examples.
#
#------------------------------------------------------------------------------
CXX = g++
#CXX = clang++
#CXXFLAGS += -g
CXXFLAGS += -O3
CXXFLAGS += -Wall -Wextra -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long
CXXFLAGS += -std=c++11
CXXFLAGS_GEOS = $(shell geos-config --cflags)
CXXFLAGS_LIBXML2 = $(shell xml2-config --cflags)
CXXFLAGS_OGR = $(shell gdal-config --cflags)
CXXFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CXXFLAGS += -I../include
# remove this if you do not want debugging to be compiled in
# CXXFLAGS += -DOSMIUM_WITH_DEBUG
LIB_EXPAT = -lexpat
LIB_GD = -lgd -lz -lm
LIB_GEOS = $(shell geos-config --libs)
LIB_OGR = $(shell gdal-config --libs)
LIB_PBF = -lz -lpthread #-lprotobuf-lite -losmpbf
LIB_SHAPE = -lshp $(LIB_GEOS)
LIB_SQLITE = -lsqlite3
LIB_XML2 = $(shell xml2-config --libs)
LIB_BZ2 = -lbz2
LDFLAGS = $(LIB_EXPAT) $(LIB_PBF)
PROGRAMS = \
count_addresses \
osmgrep \
osmstats
.PHONY: all clean
all: $(PROGRAMS)
count_addresses: count_addresses.cpp
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIB_BZ2)
osmgrep: osmgrep.cpp
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIB_BZ2)
osmstats: osmstats.cpp
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIB_BZ2) $(LIB_GEOS)
clean:
rm -f *.o core $(PROGRAMS)