all: pkl-wallpaper distance_field_generator

pkl-wallpaper: src/wallpaper.c
	gcc -O3 -Werror -Wall -Wextra -pedantic -I./vendor/raylib-5.5_linux_amd64/include/ -o pkl-wallpaper src/wallpaper.c -L./vendor/raylib-5.5_linux_amd64/lib -l:libraylib.a -lm

distance_field_generator: src/distance_field_generator.c
	gcc -Werror -Wall -Wextra -pedantic -fopenmp -I./vendor/raylib-5.5_linux_amd64/include/ -o distance_field_generator src/distance_field_generator.c -L./vendor/raylib-5.5_linux_amd64/lib -l:libraylib.a -lm

install: pkl-wallpaper
	sudo install -D -m 755 pkl-wallpaper /usr/local/bin/pkl-wallpaper
	sudo mkdir -p /usr/local/share/pkl-wallpaper
	sudo cp -r assets /usr/local/share/pkl-wallpaper/

uninstall:
	sudo rm -f /usr/local/bin/pkl-wallpaper
	sudo rm -rf /usr/local/share/pkl-wallpaper/

clean:
	rm -f pkl-wallpaper distance_field_generator

.PHONY: all install uninstall clean
