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