BINARY=gear

CC=g++
CFLAGS=-O3 -Wall -Wextra -Iimgui -IrlImGui
LDFLAGS=-lraylib -lm

CFILES=$(shell find -L * -type f -name '*.cpp')
OBJ=$(CFILES:.cpp=.o)

$(BINARY): $(OBJ) Makefile
	$(CC) $(OBJ) $(LDFLAGS) -o $@

%.o: %.cpp
	$(CC) $(CFLAGS) -c $< -o $@

run: $(BINARY)
	./$(BINARY)

clean:
	rm -rf $(OBJ) $(BINARY)

