Make CXX/CXXFLAGS overridable

This makes it easier to support systemwide compiler settings.
While here, link with pthreads in a more correct way (-pthread instead
of -lpthread).
This commit is contained in:
Dmitry Marakasov 2013-08-27 22:16:22 +04:00
parent d9be2d1024
commit 2c281c9bf8
2 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
CXX = g++
CXXFLAGS = -O3
CXX ?= g++
CXXFLAGS ?= -O3
AR = ar
all: libosmpbf.a ../include/osmpbf/fileformat.pb.h ../include/osmpbf/osmformat.pb.h

View File

@ -1,7 +1,8 @@
CXX = g++
CXXFLAGS = -g -I../include
LDFLAGS = -L../src -lpthread -lz -lprotobuf-lite -losmpbf
CXX ?= g++
CXXFLAGS ?= -g
CXXFLAGS += -I../include
LDFLAGS += -L../src -pthread -lz -lprotobuf-lite -losmpbf
all: osmpbf-outline