Merge pull request #43 from AlvaroBurnett/master

Makefile: Find SDL2.dll
This commit is contained in:
Lior Halphon 2018-03-12 23:56:13 +02:00 committed by GitHub
commit 029c685268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,12 +235,9 @@ $(OBJ)/%.res: %.rc
%.o: %.res
cvtres /OUT:"$@" $^
# We must provide SDL2.dll with the Windows port. This is an AWFUL HACK to find it.
SPACE :=
SPACE +=
# We must provide SDL2.dll with the Windows port.
$(BIN)/SDL/SDL2.dll:
@$(eval POTENTIAL_MATCHES := $(subst @@@," ",$(patsubst %,%/SDL2.dll,$(subst ;,$(SPACE),$(subst $(SPACE),@@@,$(lib))))))
@$(eval MATCH := $(shell ls $(POTENTIAL_MATCHES) 2> NUL | head -n 1))
@$(eval MATCH := $(shell where $$LIB:SDL2.dll))
cp "$(MATCH)" $@
# Tester