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
|
2020-03-25 14:57:20 +00:00
|
|
|
LEVEL_LIST = public/assets/levelList.json
|
2020-03-26 11:54:23 +00:00
|
|
|
CONFIG = public/assets/config.json
|
2020-03-23 19:11:39 +00:00
|
|
|
|
|
|
|
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-26 11:54:23 +00:00
|
|
|
OUTPUT = $(ICON) $(APPLE) $(WALL) $(SNAKE) $(LEVEL_LIST) $(CONFIG) $(CSS) $(JS)
|
2020-03-24 09:46:01 +00:00
|
|
|
|
2020-03-26 11:54:23 +00:00
|
|
|
all: icon apple wall snake levelList config css js
|
2020-03-23 19:11:39 +00:00
|
|
|
icon: $(ICON)
|
|
|
|
apple: $(APPLE)
|
|
|
|
wall: $(WALL)
|
|
|
|
|
|
|
|
snake: $(SNAKE)
|
2020-03-25 14:57:20 +00:00
|
|
|
levelList: $(LEVEL_LIST)
|
2020-03-26 11:54:23 +00:00
|
|
|
config: $(CONFIG)
|
2020-03-23 19:11:39 +00:00
|
|
|
|
|
|
|
css: $(CSS)
|
|
|
|
|
2020-03-24 09:46:01 +00:00
|
|
|
js: $(JS)
|
|
|
|
|
2020-03-23 19:11:39 +00:00
|
|
|
public/favicon.ico: assets/icon.jpg
|
|
|
|
convert $^ -resize 32x $@
|
|
|
|
|
2020-03-25 14:57:20 +00:00
|
|
|
public/assets/%32.png: assets/%.png
|
2020-03-23 19:11:39 +00:00
|
|
|
convert $^ -resize 32x $@
|
2020-03-25 14:57:20 +00:00
|
|
|
public/assets/%256.png: assets/%.png
|
|
|
|
convert $^ -resize 256x $@
|
2020-03-23 19:11:39 +00:00
|
|
|
|
2020-03-25 14:57:20 +00:00
|
|
|
public/assets/%32.png: assets/%.jpg
|
2020-03-23 19:11:39 +00:00
|
|
|
convert $^ -resize 32x $@
|
2020-03-25 14:57:20 +00:00
|
|
|
public/assets/%256.png: assets/%.jpg
|
|
|
|
convert $^ -resize 256x $@
|
2020-03-23 19:11:39 +00:00
|
|
|
|
2020-03-25 14:57:20 +00:00
|
|
|
public/assets/%.json: assets/%.json
|
2020-03-23 19:11:39 +00:00
|
|
|
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)
|