A "simple" Snake, done as my final JS class project back in DUT https://snek.s.codinget.me
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Snek/Makefile

47 lines
1.1 KiB

.PHONY: all clean
IMAGES = $(foreach name, apple wall, public/assets/$(name)32.png)
TILESETS = $(foreach name, hole, public/assets/$(name)-ts.png)
JSON = $(foreach name, snake levelList config, public/assets/$(name).json)
ICON = public/assets/icon32.png public/assets/icon256.png public/favicon.ico
CSS = public/css/snek.css
JS = public/js/snek.js
OUTPUT = $(IMAGES) $(TILESETS) $(JSON) $(ICON) $(CSS) $(JS)
all: images tilesets json icon css js
images: $(IMAGES)
tilesets: $(TILESETS)
json: $(JSON)
icon: $(ICON)
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/%-ts.png: assets/%.png
convert $^ -scale 32x $@
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)