27 rindas
514 B
Makefile
27 rindas
514 B
Makefile
.DEFAULT_GOAL := build
|
|
|
|
SRC_IMAGES := $(wildcard gallery/*.jpg)
|
|
DST_IMAGES := $(sort $(addprefix build/,$(addsuffix .bmp,$(notdir $(basename $(SRC_IMAGES))))))
|
|
|
|
all: clean build
|
|
|
|
download: jokes.json
|
|
|
|
jokes.json: build-dir
|
|
curl -o build/jokes.json https://github.com/wiz64/superfun/raw/main/database/ichd/jokes-file.json
|
|
|
|
build: build-dir images download
|
|
|
|
build-dir:
|
|
mkdir -p build
|
|
|
|
images: $(DST_IMAGES)
|
|
|
|
$(DST_IMAGES): build/%.bmp: gallery/%.jpg
|
|
./convert_image.sh $< $@
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf build/
|
|
|