Add world generator sources and binary

This commit is contained in:
chelsea
2025-12-02 18:38:45 -06:00
parent 3f92f5add7
commit 2482740b89
10 changed files with 4163 additions and 0 deletions

22
worldgen-c/Makefile Normal file
View File

@@ -0,0 +1,22 @@
CC ?= gcc
CFLAGS ?= -O3 -march=native -std=c11 -Wall -Wextra -pedantic -Iinclude
LDFLAGS ?= -lm -pthread -lz
SRC := src/main.c src/worldgen.c src/noise.c
OBJ := $(SRC:.c=.o)
BIN_DIR := bin
TARGET := $(BIN_DIR)/worldgen
all: $(TARGET)
$(TARGET): $(OBJ) | $(BIN_DIR)
$(CC) $(CFLAGS) $(OBJ) -o $@ $(LDFLAGS)
$(BIN_DIR):
mkdir -p $(BIN_DIR)
clean:
rm -f $(OBJ) $(TARGET)
.PHONY: all clean