Skip to content

Commit 2c281c9

Browse files
committed
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).
1 parent d9be2d1 commit 2c281c9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
CXX = g++
3-
CXXFLAGS = -O3
2+
CXX ?= g++
3+
CXXFLAGS ?= -O3
44
AR = ar
55

66
all: libosmpbf.a ../include/osmpbf/fileformat.pb.h ../include/osmpbf/osmformat.pb.h

tools/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

2-
CXX = g++
3-
CXXFLAGS = -g -I../include
4-
LDFLAGS = -L../src -lpthread -lz -lprotobuf-lite -losmpbf
2+
CXX ?= g++
3+
CXXFLAGS ?= -g
4+
CXXFLAGS += -I../include
5+
LDFLAGS += -L../src -pthread -lz -lprotobuf-lite -losmpbf
56

67
all: osmpbf-outline
78

0 commit comments

Comments
 (0)