aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrow Savcik <krow@savcik.xyz>2024-01-11 15:29:47 +0200
committerKrow Savcik <krow@savcik.xyz>2024-01-11 15:29:47 +0200
commit0df2d329d9ec3458d8f6d80b5937ad92722da940 (patch)
tree6f72d1e7345a63214e9fdd3176f276793d5ed911
parente19d0f9124f09df0c37038d422db79d841e3763c (diff)
added: config.def.h
Now the default configuration is in config.def.h Before compiling for the first time, config.h is created.
-rw-r--r--Makefile9
-rw-r--r--README.md2
-rw-r--r--config.def.h (renamed from src/config.h)3
3 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index ba33b3c..b3eccec 100644
--- a/Makefile
+++ b/Makefile
@@ -3,11 +3,12 @@ include config.mk
TOBJ = ui.o canvas.o user.o palette.o tools.o debug.o
OBJ = $(addprefix build/, ${TOBJ})
-all: build run
-
-build: ${OBJ} src/cdraw.c
+build: prep config.h ${OBJ} src/cdraw.c
${CC} ${CFLAGS} ${LIBS} ${OBJ} src/cdraw.c -o build/cdraw
+config.h:
+ cp config.def.h config.h
+
prep:
mkdir -p build
@@ -20,3 +21,5 @@ build/%.o: src/%.c
clean:
rm $(OBJ)
rm build/cdraw
+
+.PHONY: build clean run prep
diff --git a/README.md b/README.md
index 2a971c7..9ddf504 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ And these features are waiting to be implemented:
Controls
--------
-All the keybindings can be changed in *src/config.h*.
+All the keybindings can be changed in *config.h*.
- **=/-** for zooming in/out
- **arrows** for moving the canvas
diff --git a/src/config.h b/config.def.h
index f224a64..396f26a 100644
--- a/src/config.h
+++ b/config.def.h
@@ -26,9 +26,6 @@ static Key keys[] = {
{0, SDLK_n, user_canvas_create_new, {.v = NULL}},
{0, SDLK_LEFTBRACKET, user_canvas_pal_col_chng, {.i = -1}},
{0, SDLK_RIGHTBRACKET, user_canvas_pal_col_chng, {.i = 1}},
-/* {0, SDLK_j, user_testing_layer_add, {.i = 1}},*/
{KMOD_LSHIFT, SDLK_r, user_testing_reload_tex, {.i = 1}},
-/* {KMOD_LSHIFT, SDLK_LEFTBRACKET, user_layer_chng, {.i = -1}},*/
-/* {KMOD_LSHIFT, SDLK_RIGHTBRACKET, user_layer_chng, {.i = 1}},*/
{0, SDLK_m, user_debug_mem_show, {.v = NULL}},
};