# 1. Variables (to avoid repeating yourself)
CC = gcc
CFLAGS = -Iinclude
LDFLAGS = -Llib -lraylib -lGL -lm -lpthread -ldl -lrt -lX11

# 2. Default target (runs when you just type 'make')
default: visual text

# 3. Specific build targets
visual: ray.c
	$(CC) ray.c -o ray.out $(CFLAGS) $(LDFLAGS)

text: text_physics.c
	$(CC) text_physics.c -o text_physics.out $(CFLAGS) $(LDFLAGS)

# 4. Cleanup targets (all mapped to the same action)
clean clear rm remove wipe:
	rm -f ray.out text_physics.out

# 5. Phony targets (tells make these are actions, not actual files)
.PHONY: default visual text clean clear rm remove wipe