first commit

This commit is contained in:
Jake
2025-05-26 20:59:26 -04:00
commit f4cfde8cf9
16 changed files with 816 additions and 0 deletions

30
makefile Normal file
View File

@@ -0,0 +1,30 @@
# Compiler and flags
CC = gcc
CFLAGS = -Wall -Wextra -std=c99 -O2 -Iinclude
LDFLAGS = -lraylib -lm -ldl -lpthread -lGL -lrt -lX11
# Directories
SRC_DIR = source
BIN_DIR = bin
BUILD_DIR = build
# Files
TARGET = $(BIN_DIR)/voxelThing
SRC = $(wildcard $(SRC_DIR)/*.c)
OBJ = $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(SRC))
# Rules
all: $(TARGET)
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
@mkdir -p $(BUILD_DIR)
$(CC) $(CFLAGS) -c $< -o $@
$(TARGET): $(OBJ)
@mkdir -p $(BIN_DIR)
$(CC) $(OBJ) -o $@ $(LDFLAGS)
clean:
rm -rf $(BUILD_DIR) $(BIN_DIR)
.PHONY: all clean