all: wallpaper distance_field_generator

wallpaper: src/wallpaper.c
	gcc -O3 -Werror -Wall -Wextra -I./vendor/raylib-5.5_linux_amd64/include/ -o 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 -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: wallpaper
	sudo install -D -m 755 wallpaper /usr/bin/wallpaper
	sudo mkdir -p /usr/share/wallpaper
	sudo cp -r resources /usr/share/wallpaper/

clean:
	rm -f wallpaper distance_field_generator

.PHONY: all install clean