CFLAGS=-g -fsanitize=address -Wall -Wextra -pedantic -O0
CC=gcc

.PHONY: build clean run all

all: main dod

main: main.c lib.h sprites.o sprites.h game_data.h ./lib/libraylib.a
	$(CC) $(CFLAGS) -Iinclude/ -lm main.c -o main sprites.o ./lib/libraylib.a

sprites.o: sprites.c sprites.h lib.h
	$(CC) $(CFLAGS) -c sprites.c -o sprites.o

dod: dod.c ./lib/libraylib.a
	$(CC) $(CFLAGS) -Iinclude/ -lm dod.c -o dod ./lib/libraylib.a

run: all
	./main

clean:
	rm -vf main

