From 6de6b358e81251bcf9c978b04452d2390d46a388 Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Fri, 25 Dec 2015 15:27:00 +0100 Subject: Use "shell" macro in CFLAGS When CFLAGS contain "`cmd`" construct, the "cmd" command is executed every time when make issues shell command with expanded CFLAGS. Using "$(shell cmd)" instead forces make to expand output of "cmd" into CFLAGS. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a0614fe..f002847 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ PREFIX ?= /usr CFLAGS ?= -W -Wall -Wpedantic -CFLAGS += -std=gnu11 `sdl2-config --cflags` -LDFLAGS += `sdl2-config --libs` -lfreeimage -lSDL2_ttf -lfontconfig -lpthread +CFLAGS += -std=gnu11 $(shell sdl2-config --cflags) +LDFLAGS += $(shell sdl2-config --libs) -lfreeimage -lSDL2_ttf -lfontconfig -lpthread TARGET = imv BUILDDIR = build -- cgit v1.2.3