Do not build sdl_image_test unless API is either sdl or sdl2

This commit is contained in:
Thomas Bernard 2019-03-09 12:17:05 +01:00
parent 23e462d177
commit 04224ac6b6
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -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 $@