Merge pull request #290 from polkornyipt/main

Add missing security flags and include CPPFLAGS in libnethogs
This commit is contained in:
Arnout Engelen
2025-03-26 14:10:46 +01:00
committed by GitHub

View File

@@ -10,7 +10,7 @@ all: $(LIBNAME) libnethogs.a
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LDFLAGS:= -shared -Wl,-soname,$(SO_NAME)
LDFLAGS:= -shared -Wl,-soname,$(SO_NAME) -Wl,-z,now -Wl,-z,relro
else ifeq ($(UNAME_S),FreeBSD)
LDFLAGS:= -shared -Wl,-soname,$(SO_NAME)
else
@@ -97,11 +97,11 @@ $(ODIR)/conninode.o: conninode.cpp nethogs.h conninode.h
$(ODIR)/devices.o: devices.cpp devices.h
@mkdir -p $(ODIR)
$(CXX) $(CXXFLAGS) -o $@ -c devices.cpp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c devices.cpp
$(ODIR)/libnethogs.o: libnethogs.cpp libnethogs.h
@mkdir -p $(ODIR)
$(CXX) $(CXXFLAGS) -o $@ -c libnethogs.cpp -DVERSION=\"$(LIBVERSION)\"
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c libnethogs.cpp -DVERSION=\"$(LIBVERSION)\"
.PHONY: clean
clean: