Snek/Makefile

50 lines
1,002 B
Makefile
Raw Normal View History

2020-03-23 19:11:39 +00:00
.PHONY: all clean
ICON = public/assets/icon32.png public/assets/icon256.png public/favicon.ico
APPLE = public/assets/apple32.png
WALL = public/assets/wall32.png
SNAKE = public/assets/snake.json
CSS = public/css/snek.css
2020-03-24 09:46:01 +00:00
JS = public/js/snek.js
2020-03-23 19:11:39 +00:00
2020-03-24 09:46:01 +00:00
OUTPUT = $(ICON) $(APPLE) $(WALL) $(SNAKE) $(CSS) $(JS)
all: icon apple wall snake css js
2020-03-23 19:11:39 +00:00
icon: $(ICON)
apple: $(APPLE)
wall: $(WALL)
snake: $(SNAKE)
css: $(CSS)
2020-03-24 09:46:01 +00:00
js: $(JS)
2020-03-23 19:11:39 +00:00
public/assets/icon32.png: assets/icon.jpg
convert $^ -resize 32x $@
public/assets/icon256.png: assets/icon.jpg
convert $^ -resize 256x $@
public/favicon.ico: assets/icon.jpg
convert $^ -resize 32x $@
public/assets/apple32.png: assets/apple.png
convert $^ -resize 32x $@
public/assets/wall32.png: assets/wall.png
convert $^ -resize 32x $@
public/assets/snake.json: assets/snake.json
cp $^ $@
2020-03-24 09:46:01 +00:00
public/css/snek.css: src/less/snek.less $(wildcard src/less/*.less)
lessc $< $@
public/js/snek.js: $(wildcard src/js/*.js)
node mergejs.js $^ > $@
2020-03-23 19:11:39 +00:00
clean:
rm -f $(OUTPUT)