53 lines
1.1 KiB
Makefile
53 lines
1.1 KiB
Makefile
.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
|
|
LEVEL_LIST = public/assets/levelList.json
|
|
CONFIG = public/assets/config.json
|
|
|
|
CSS = public/css/snek.css
|
|
|
|
JS = public/js/snek.js
|
|
|
|
OUTPUT = $(ICON) $(APPLE) $(WALL) $(SNAKE) $(LEVEL_LIST) $(CONFIG) $(CSS) $(JS)
|
|
|
|
all: icon apple wall snake levelList config css js
|
|
icon: $(ICON)
|
|
apple: $(APPLE)
|
|
wall: $(WALL)
|
|
|
|
snake: $(SNAKE)
|
|
levelList: $(LEVEL_LIST)
|
|
config: $(CONFIG)
|
|
|
|
css: $(CSS)
|
|
|
|
js: $(JS)
|
|
|
|
public/favicon.ico: assets/icon.jpg
|
|
convert $^ -resize 32x $@
|
|
|
|
public/assets/%32.png: assets/%.png
|
|
convert $^ -resize 32x $@
|
|
public/assets/%256.png: assets/%.png
|
|
convert $^ -resize 256x $@
|
|
|
|
public/assets/%32.png: assets/%.jpg
|
|
convert $^ -resize 32x $@
|
|
public/assets/%256.png: assets/%.jpg
|
|
convert $^ -resize 256x $@
|
|
|
|
public/assets/%.json: assets/%.json
|
|
cp $^ $@
|
|
|
|
public/css/snek.css: src/less/snek.less $(wildcard src/less/*.less)
|
|
lessc $< $@
|
|
|
|
public/js/snek.js: $(wildcard src/js/*.js)
|
|
node mergejs.js $^ > $@
|
|
|
|
clean:
|
|
rm -f $(OUTPUT)
|