themes: convert colorscheme.c to Perl

This commit is contained in:
Lucas 2020-12-06 15:08:37 +00:00
parent e71a6eb321
commit 54a7ab5e6e
3 changed files with 183 additions and 210 deletions

View file

@ -1,5 +1,5 @@
# env
# Written in 2019 by Lucas
# Written in 2019-2020 by Lucas
# CC0 1.0 Universal/Public domain - No rights reserved
#
# To the extent possible under law, the author(s) have dedicated all
@ -10,25 +10,21 @@
# <http://creativecommons.org/publicdomain/zero/1.0/>.
.POSIX:
.SUFFIXES:
.SUFFIXES: .c .in .txt .png
.SUFFIXES: .in .txt .png
LDLIBS= -lm
THEMES= blueie brightie brightie2 brightie3 brightie4
.c:
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
.in.txt:
./colorscheme <"$<" >"$@"
perl colorscheme.pl <"$<" >"$@"
.in.png:
./colorscheme -i <"$<" | pnmtopng >"$@"
perl colorscheme.pl -i <"$<" | pnmtopng >"$@"
all: colorscheme
all: colorscheme.pl
clean:
rm -f colorscheme $(THEMES:=.png) $(THEMES:=.txt)
rm -f $(THEMES:=.png) $(THEMES:=.txt)
show: $(THEMES:=.png) $(THEMES:=.txt)
show: $(THEMES:=.txt) $(THEMES:=.png)
$(THEMES:=.png) $(THEMES:=.txt): all
$(THEMES:=.txt) $(THEMES:=.png): all