Support hardening buildflags set in the environment.

This commit is contained in:
Bas Couwenberg 2020-10-25 06:36:32 +01:00
parent e0d4b58e66
commit 09845ca408
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