Skip to content

Commit

Permalink
Support hardening buildflags set in the environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastic committed Oct 25, 2020
1 parent e0d4b58 commit 09845ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ libosmpbf.a: fileformat.pb.o osmformat.pb.o
$(AR) -cr $@ fileformat.pb.o osmformat.pb.o

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

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

%.pb.cc ../include/osmpbf/%.pb.h: %.proto
$(PROTOC) --proto_path=. --cpp_out=. $<
Expand Down
2 changes: 1 addition & 1 deletion tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LDFLAGS += -L../src -pthread -lz -lprotobuf -losmpbf
all: osmpbf-outline

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

install:
install -m 755 -d $(DESTDIR)$(PREFIX)/bin
Expand Down

0 comments on commit 09845ca

Please sign in to comment.