diff options
author | Christian Hesse <mail@eworm.de> | 2016-05-03 21:26:05 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2016-05-03 21:26:05 +0200 |
commit | b08dc6a4023f5ee75b667d84712935b42f0381cd (patch) | |
tree | 52f8261f2a835b6a1a64dfb0edcc195b41341982 | |
parent | 5e4f7c163cb3eeae75f4038bbac947d9ba5c3c65 (diff) | |
download | netlink-notify-b08dc6a4023f5ee75b667d84712935b42f0381cd.tar.gz netlink-notify-b08dc6a4023f5ee75b667d84712935b42f0381cd.tar.zst |
fix compiler and linker flags and produce binaries with full RELRO
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,13 +1,18 @@ # netlink-notify - Notify about netlink changes +# commands CC := gcc MD := markdown CONVERT := convert -define png:compression-level=9 -background transparent INSTALL := install CP := cp RM := rm -CFLAGS += -std=c11 -O2 -Wall -Werror + +# flags +CFLAGS += -std=c11 -O2 -fPIC -Wall -Werror CFLAGS += $(shell pkg-config --cflags --libs libnotify) +LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie + # this is just a fallback in case you do not use git but downloaded # a release tarball... VERSION := 0.7.4 @@ -15,7 +20,7 @@ VERSION := 0.7.4 all: netlink-notify icons README.html netlink-notify: netlink-notify.c version.h config.h - $(CC) $(CFLAGS) -o netlink-notify netlink-notify.c + $(CC) $(CFLAGS) $(LDFLAGS) -o netlink-notify netlink-notify.c config.h: $(CP) config.def.h config.h |