From cbecdeba3bd252bdc7f60f926fa43e85378d1c5d Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Sat, 26 Dec 2015 12:32:54 +0100 Subject: Use simply expanded variables wherever possible Recursively expanded variables (VAR = CONTENT) are evaluated when used. Simply extended variables (VAR := CONTENT) are expanded immediately, and remain stable throughout lifetime of the process, reducing fragility of build system. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f80e64c..a979d65 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,12 @@ CFLAGS ?= -W -Wall -Wpedantic CFLAGS += -std=gnu11 $(shell sdl2-config --cflags) LDFLAGS += $(shell sdl2-config --libs) -lfreeimage -lSDL2_ttf -lfontconfig -lpthread -TARGET = $(BUILDDIR)/imv BUILDDIR ?= build +TARGET := $(BUILDDIR)/imv -SOURCES = $(wildcard src/*.c) -OBJECTS = $(patsubst src/%.c,$(BUILDDIR)/%.o,$(SOURCES)) -TESTS = $(patsubst test/%.c,$(BUILDDIR)/test_%,$(wildcard test/*.c)) +SOURCES := $(wildcard src/*.c) +OBJECTS := $(patsubst src/%.c,$(BUILDDIR)/%.o,$(SOURCES)) +TESTS := $(patsubst test/%.c,$(BUILDDIR)/test_%,$(wildcard test/*.c)) VERSION = "v1.2.0" -- cgit v1.2.3