aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrij D. Czarkoff <czarkoff@gmail.com>2015-12-25 15:11:32 +0100
committerDmitrij D. Czarkoff <czarkoff@gmail.com>2015-12-25 15:11:32 +0100
commit57d83b7b376a71726c148d9b82a43285c70fe0b8 (patch)
tree632706eba3e4bb238101f54ac2a8ea240ac1364d
parentab0c27611be891841f5d7f250ae95c3a9895c145 (diff)
downloadimv-57d83b7b376a71726c148d9b82a43285c70fe0b8.tar.gz
Respect default CFLAGS and LDFLAGS if set in environment
Some package management systems allow users to set default CFLAGS and LDFLAGS and then supply them to the make via environment. This change makes build infrastructure respect such settings. Also, don't force non-essential flags.
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f07141f..a0614fe 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,9 @@
PREFIX ?= /usr
-CFLAGS = -W -Wall -Wpedantic -std=gnu11 `sdl2-config --cflags`
-LDFLAGS = `sdl2-config --libs` -lfreeimage -lSDL2_ttf -lfontconfig -lpthread
+CFLAGS ?= -W -Wall -Wpedantic
+CFLAGS += -std=gnu11 `sdl2-config --cflags`
+LDFLAGS += `sdl2-config --libs` -lfreeimage -lSDL2_ttf -lfontconfig -lpthread
TARGET = imv
BUILDDIR = build