aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 10f2635..37c1e85 100644
--- a/Makefile
+++ b/Makefile
@@ -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