terrain

Real-time terrain generation using marching cubes
git clone git://git.christianermann.dev/terrain
Log | Files | Refs | README | LICENSE

commit 2b0e895deab15baaeecf5cbe460ebe97ff859ede
parent f4db61f401baf821a671f85782e1f8f2a194501d
Author: Christian Ermann <christianermann@gmail.com>
Date:   Sat, 28 May 2022 13:58:40 -0700

Moved glad to extern directory

Diffstat:
Rinclude/KHR/khrplatform.h -> extern/include/KHR/khrplatform.h | 0
Rinclude/glad/glad.h -> extern/include/glad/glad.h | 0
Rsrc/glad.c -> extern/src/glad.c | 0
Aextern/src/glad.d | 6++++++
Aextern/src/glad.o | 0
Mmakefile | 15++++++++++-----
6 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/include/KHR/khrplatform.h b/extern/include/KHR/khrplatform.h diff --git a/include/glad/glad.h b/extern/include/glad/glad.h diff --git a/src/glad.c b/extern/src/glad.c diff --git a/extern/src/glad.d b/extern/src/glad.d @@ -0,0 +1,6 @@ +extern/src/glad.o: extern/src/glad.c extern/include/glad/glad.h \ + extern/include/KHR/khrplatform.h + +extern/include/glad/glad.h: + +extern/include/KHR/khrplatform.h: diff --git a/extern/src/glad.o b/extern/src/glad.o Binary files differ. diff --git a/makefile b/makefile @@ -1,17 +1,22 @@ -SRC_DIR := src +APP_SRC_DIR := src +EXT_SRC_DIR := extern/src OBJ_DIR := obj BIN_DIR := bin EXE := $(BIN_DIR)/app -SRC := $(wildcard $(SRC_DIR)/*.c) -OBJ := $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) +SRC := $(wildcard $(APP_SRC_DIR)/*.c) $(wildcard $(EXT_SRC_DIR)/*.c) +SRC := $(notdir $(SRC)) -CPPFLAGS := -Iinclude -MMD -MP +OBJ := $(SRC:%.c=$(OBJ_DIR)/%.o) + +CPPFLAGS := -Iinclude -Iextern/include -MMD -MP CFLAGS := -Wall LDFLAGS := -L/usr/local/lib LDLIBS := -lSDL2 +vpath %.c $(APP_SRC_DIR) $(EXT_SRC_DIR) + .PHONY: all clean all: $(EXE) @@ -19,7 +24,7 @@ all: $(EXE) $(EXE): $(OBJ) | $(BIN_DIR) $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ -$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR) +$(OBJ_DIR)/%.o: %.c | $(OBJ_DIR) $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ $(BIN_DIR) $(OBJ_DIR):