Merge pull request #48 from sebastic/hardening

Support hardening buildflags set in the environment.
This commit is contained in:
Jochen Topf 2020-10-25 15:28:26 +01:00 committed by GitHub
commit 8ab05caeb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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=. $<

View File

@ -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