SRCS=$(wildcard MyPlayground*/Contents.swift)
ifeq ($(shell uname -s),Linux)
SRCS=$(filter-out MyPlayground11.% MyPlayground12.% MyPlayground13.%, $(wildcard MyPlayground*/Contents.swift))
endif
EXES=$(SRCS:%.swift=%)
SWIFTCFLAGS=

all: $(EXES)

MyPlayground14.playground/Contents: MyPlayground14.playground/Contents.swift MyPlayground14.playground/Sources/DivideAndModulo.swift
	(cd MyPlayground14.playground/; ln -sf Contents.swift main.swift)
	swiftc $(SWIFTCFLAGS) -o $@ MyPlayground14.playground/main.swift MyPlayground14.playground/Sources/DivideAndModulo.swift

%: %.swift
	swiftc $(SWIFTCFLAGS) -o $@ $^

clean:
	rm -f $(EXES)

exec:
	for exe in $(EXES); do ./$$exe; done
