diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2019-02-24 15:09:37 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2019-02-24 15:09:37 +0200 |
commit | bfaa5b5c087d3e3e36991583f326cbef88407ebb (patch) | |
tree | ce195d0ffc7bd11ae4187e74f7e553736a063352 /Makefile | |
parent | 11d0d93576cd834b5126529daa736d4b4b62330e (diff) |
Makefile: Change default CPP/CFLAGS
-D_FORTIFY_SOURCE=2 and -O2 enables some useful diagnosis.
Move WARNINGS into CFLAGS ?= assignment, as they are compiler specific.
The default compilation flags assumes gcc, but can easily be
changed by overriding CFLAGS and CPPFLAGS.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6,8 +6,9 @@ MAKEFLAGS += --no-builtin-rules WARNINGS := -Wall -Wextra -Wpedantic -Wformat=2 -Wstrict-aliasing=3 -Wstrict-overflow=5 -Wstack-usage=12500 \ -Wfloat-equal -Wcast-align -Wpointer-arith -Wchar-subscripts -Warray-bounds=2 -override CFLAGS ?= -g -override CFLAGS += -std=c99 $(WARNINGS) +override CFLAGS ?= -g -O2 $(WARNINGS) +override CFLAGS += -std=c99 +override CPPFLAGS ?= -D_FORTIFY_SOURCE=2 override CPPFLAGS += -Isrc bins = ptrace-region-rw ptrace-address-rw uio-region-rw uio-address-rw memview binsearch bintrim |