From: James Le Cuirot Date: Mon, 2 Sep 2019 21:51:52 +0000 (+0100) Subject: Use shell Makefile function to avoid repeatedly calling pkg-config X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=307ac00a33ce00297cf446063171ea8206ee30bf;p=liskon_frotz.git Use shell Makefile function to avoid repeatedly calling pkg-config It was being called many times when using backticks. --- diff --git a/Makefile b/Makefile index b7bb680..236330d 100644 --- a/Makefile +++ b/Makefile @@ -207,7 +207,7 @@ endif SDL_DIR = $(SRCDIR)/sdl SDL_LIB = $(SDL_DIR)/frotz_sdl.a export SDL_PKGS = libpng libjpeg sdl2 SDL2_mixer freetype2 zlib -SDL_LDFLAGS += `$(PKG_CONFIG) $(SDL_PKGS) --libs` -lm +SDL_LDFLAGS += $(shell $(PKG_CONFIG) $(SDL_PKGS) --libs) -lm DOS_DIR = $(SRCDIR)/dos diff --git a/src/sdl/Makefile b/src/sdl/Makefile index d8043ef..bdc12dd 100644 --- a/src/sdl/Makefile +++ b/src/sdl/Makefile @@ -8,7 +8,7 @@ CC = gcc #CC = clang PKG_CONFIG ?= pkg-config -override CFLAGS += `$(PKG_CONFIG) $(SDL_PKGS) --cflags` +override CFLAGS += $(shell $(PKG_CONFIG) $(SDL_PKGS) --cflags) SOURCES = sf_fonts.c sf_msg_en.c sf_resource.c sf_util.c \ sf_deffont.c sf_ftype.c sf_osfdlg.c sf_sig.c sf_video.c \