From 57d83b7b376a71726c148d9b82a43285c70fe0b8 Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Fri, 25 Dec 2015 15:11:32 +0100 Subject: 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. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3