diff options
author | Christian Hesse <mail@eworm.de> | 2016-05-03 21:19:50 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2016-05-03 21:19:50 +0200 |
commit | 32af97395ea39b81434061a4e76fc9794e4f81ad (patch) | |
tree | e6d0250e7677db485336e52eb4e780bd52849701 /Makefile | |
parent | d99976fb2b887dce25f144d1b885c7349484f6d2 (diff) | |
download | extract-artwork-32af97395ea39b81434061a4e76fc9794e4f81ad.tar.gz extract-artwork-32af97395ea39b81434061a4e76fc9794e4f81ad.tar.zst |
fix compiler and linker flags and produce binaries with full RELRO
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,12 +1,17 @@ # extract-artwork - Extract artwork from media files +# commands CC := gcc MD := markdown 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 libavformat libavutil) +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.0.1 @@ -14,7 +19,7 @@ VERSION := 0.0.1 all: extract-artwork README.html extract-artwork: extract-artwork.c - $(CC) $(CFLAGS) -o extract-artwork extract-artwork.c + $(CC) $(CFLAGS) $(LDFLAGS) -o extract-artwork extract-artwork.c README.html: README.md $(MD) README.md > README.html |