Archived
1
Fork 0

Back to using gcc

For no reason whatsoever
This commit is contained in:
Hadeed 2023-09-25 05:14:10 +05:00
parent c4af9bda7c
commit 19716973cf
2 changed files with 7 additions and 15 deletions

View file

@ -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)

View file

@ -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();