Update Makefile

This commit is contained in:
2026-06-12 13:02:08 -04:00
parent 20706dc060
commit 0927a0a531

View File

@@ -1,2 +1,21 @@
default:
gcc ray.c -o my_game -Iinclude -Llib -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
# 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