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.
This commit is contained in:
Dmitrij D. Czarkoff 2015-12-25 15:11:32 +01:00
parent ab0c27611b
commit 57d83b7b37

View file

@ -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