Skip to content

Commit 09845ca

Browse files
committed
Support hardening buildflags set in the environment.
1 parent e0d4b58 commit 09845ca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ libosmpbf.a: fileformat.pb.o osmformat.pb.o
1919
$(AR) -cr $@ fileformat.pb.o osmformat.pb.o
2020

2121
libosmpbf.so: fileformat.pb.o osmformat.pb.o
22-
$(CXX) -shared -Wl,-soname,$(SONAME) -o $@ fileformat.pb.o osmformat.pb.o
22+
$(CXX) $(CPPFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ fileformat.pb.o osmformat.pb.o
2323

2424
%.pb.o: %.pb.cc
25-
$(CXX) $(CXXFLAGS) -fPIC -c -o $@ $<
25+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c -o $@ $<
2626

2727
%.pb.cc ../include/osmpbf/%.pb.h: %.proto
2828
$(PROTOC) --proto_path=. --cpp_out=. $<

tools/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LDFLAGS += -L../src -pthread -lz -lprotobuf -losmpbf
1212
all: osmpbf-outline
1313

1414
osmpbf-outline: osmpbf-outline.cpp
15-
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS)
15+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< $(LDFLAGS)
1616

1717
install:
1818
install -m 755 -d $(DESTDIR)$(PREFIX)/bin

0 commit comments

Comments
 (0)