From 19716973cf523bcabdc598433efb29b92457bbfa Mon Sep 17 00:00:00 2001 From: Hadeed Ahmad Date: Mon, 25 Sep 2023 05:14:10 +0500 Subject: [PATCH] Back to using gcc For no reason whatsoever --- Makefile | 21 ++++++--------------- src/input.c | 1 + 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 095a853..1690ef8 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,18 @@ -HASH := $(shell git rev-parse --short HEAD) SRCS := $(wildcard src/*.c) OBJS := $(SRCS:src/%.c=build/%.o) -DEPS := $(OBJS:%.o=%.d) +DEPS := $(OBJS:.o=.d) -WARNING_FLAGS := -Wall -Wextra -INCLUDE_FLAGS := -I include - -CC := clang -CFLAGS := $(WARNING_FLAGS) $(INCLUDE_FLAGS) -DKILO_COMMIT_HASH=$(HASH) -MMD -MP -std=c99 -g +CFLAGS := -Wall -Wextra -Iinclude -DKILO_COMMIT_HASH=$(shell git rev-parse --short HEAD) -MMD -MP -std=c99 -ggdb kilo: $(OBJS) - $(CC) $(CFLAGS) $^ -o $@ + gcc $^ -o $@ $(OBJS): build/%.o: src/%.c @mkdir -p build - $(CC) $(CFLAGS) -c $< -o $@ - -.PHONY: install clean -install: kilo - cp kilo ~/bin + gcc $(CFLAGS) -c $< -o $@ clean: - rm -rf build - rm -f ./kilo + rm -rf build kilo +.PHONY: clean -include $(DEPS) diff --git a/src/input.c b/src/input.c index 9e62080..6c29045 100644 --- a/src/input.c +++ b/src/input.c @@ -25,6 +25,7 @@ void input_process_key(KEY c) { case DEL: input_process_key(ARROW_RIGHT); + // fall through case BACKSPACE: case CTRL_KEY('H'): command_delete_char();