Skip to content

Commit 5ab0a3a

Browse files
committed
Add Linux compatibility
1 parent 4106c57 commit 5ab0a3a

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

Diff for: Makefile

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
GIMP=/Applications/Gimp.app/Contents/MacOS/gimp-2.8
1+
PLATFORM ?= $(shell uname)
22

3-
ASSETS=$(wildcard assets/*.png)
4-
SRCS=$(wildcard text/*.txt)
5-
OUTPUT=$(SRCS:text/%.txt=output/%.png)
3+
ifeq ($(PLATFORM),Linux)
4+
GIMP ?= $(shell which gimp)
5+
endif
6+
ifeq ($(PLATFORM),Darwin)
7+
GIMP ?= $(wildcard /Applications/Gimp.app/Contents/MacOS/gimp-*)
8+
endif
9+
10+
ifeq ($(wildcard $(GIMP)),)
11+
$(error Gimp must be installed. Set GIMP variable to executable path.)
12+
endif
13+
14+
ASSETS := $(wildcard assets/*.png)
15+
SRCS := $(wildcard text/*.txt)
16+
OUTPUT := $(SRCS:text/%.txt=output/%.png)
617

718
output/%.png: text/%.txt src/create-play-promo.scm $(ASSETS)
819
echo '(localize-subheading "$(shell cat $<)" "Essential PragmataPro" "$@") (gimp-quit 0)' | cat src/create-play-promo.scm - | $(GIMP) -n -i -b -

0 commit comments

Comments
 (0)