terrain

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

commit 15978352074cc31e15335776c0eb7fe7142cba1f
parent ad16a3f71267fd07df2b3f7cb55f19297ad432cd
Author: Christian Ermann <christianermann@gmail.com>
Date:   Sun, 29 May 2022 16:41:40 -0700

Add release build procedure.

Diffstat:
M.gitignore | 2++
Mmakefile | 15+++++++++++++--
Aresources/README.txt | 14++++++++++++++
Aresources/run.sh | 3+++
4 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,3 +1,5 @@ .DS_Store bin obj +savedata +release diff --git a/makefile b/makefile @@ -3,14 +3,18 @@ EXT_SRC_DIR := extern/src OBJ_DIR := obj BIN_DIR := bin +RES_DIR := resources +SHD_DIR := shaders +REL_DIR := release + EXE := $(BIN_DIR)/app SRC := $(wildcard $(APP_SRC_DIR)/*.c) $(wildcard $(EXT_SRC_DIR)/*.c) SRC := $(notdir $(SRC)) -OBJ := $(SRC:%.c=$(OBJ_DIR)/%.o) +SHD := $(wildcard $(SHD_DIR)/*.vs) $(wildcard $(SHD_DIR)/*.fs) -$(info OBJ $(OBJ)) +OBJ := $(SRC:%.c=$(OBJ_DIR)/%.o) CPPFLAGS := -Iinclude -Iextern/include -MMD -MP CFLAGS := -Wall @@ -32,6 +36,13 @@ $(OBJ_DIR)/%.o: %.c | $(OBJ_DIR) $(BIN_DIR) $(OBJ_DIR): mkdir -p $@ +release: $(EXE) $(SHD) + mkdir -p $(REL_DIR) + cp -r $(BIN_DIR) $(REL_DIR) + cp -r $(SHD_DIR) $(REL_DIR) + cp $(RES_DIR)/* $(REL_DIR) + chmod +x $(REL_DIR)/run.sh + clean: @$(RM) -rv $(BIN_DIR) $(OBJ_DIR) diff --git a/resources/README.txt b/resources/README.txt @@ -0,0 +1,14 @@ + +Use the mouse to look around + +W/S -> Move forwards/backwards +A/D -> Move left/right +Space/Left Shift -> Move upwards/downwards + +X/Z -> Enable/disable wireframe +N/M -> Enable/disable surface normal shading + +Escape/Enter -> Show/hide mouse + +Q -> Quit + diff --git a/resources/run.sh b/resources/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd "${0%/*}" +./bin/app