From 04224ac6b6c7f6ff088c189b3092a53dee5b8568 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 9 Mar 2019 12:17:05 +0100 Subject: [PATCH] Do not build sdl_image_test unless API is either sdl or sdl2 --- tools/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index a80943ad..0a51a3ab 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -5,6 +5,14 @@ ifneq ($(shell test -f ../src/version.c && echo exists),exists) $(error please build grafx2 first. missing version.c file.) endif +API ?= sdl + +TOOLS = gifanalyzer test_iff + +ifeq (sdl,$(findstring sdl,$(API))) +TOOLS += sdl_image_test +endif + GIT_REVISION = $(shell cat ../src/version.c | cut -f 2 -d '"') LABEL = $(shell cat ../src/pversion.c | cut -f 2 -d '"') VERSION = $(subst wip.,wip,$(LABEL).$(GIT_REVISION)) @@ -15,7 +23,7 @@ DOCARCHIVE = ../grafx2-$(VERSION)-doxygen.tgz .PHONY: all gifanalyzer sdl_image_test test_iff doxygen -all: gifanalyzer sdl_image_test test_iff +all: $(TOOLS) gifanalyzer: $(MAKE) -C $@