Back to using gcc
For no reason whatsoever
This commit is contained in:
parent
c4af9bda7c
commit
19716973cf
2 changed files with 7 additions and 15 deletions
21
Makefile
21
Makefile
|
@ -1,27 +1,18 @@
|
||||||
HASH := $(shell git rev-parse --short HEAD)
|
|
||||||
SRCS := $(wildcard src/*.c)
|
SRCS := $(wildcard src/*.c)
|
||||||
OBJS := $(SRCS:src/%.c=build/%.o)
|
OBJS := $(SRCS:src/%.c=build/%.o)
|
||||||
DEPS := $(OBJS:%.o=%.d)
|
DEPS := $(OBJS:.o=.d)
|
||||||
|
|
||||||
WARNING_FLAGS := -Wall -Wextra
|
CFLAGS := -Wall -Wextra -Iinclude -DKILO_COMMIT_HASH=$(shell git rev-parse --short HEAD) -MMD -MP -std=c99 -ggdb
|
||||||
INCLUDE_FLAGS := -I include
|
|
||||||
|
|
||||||
CC := clang
|
|
||||||
CFLAGS := $(WARNING_FLAGS) $(INCLUDE_FLAGS) -DKILO_COMMIT_HASH=$(HASH) -MMD -MP -std=c99 -g
|
|
||||||
|
|
||||||
kilo: $(OBJS)
|
kilo: $(OBJS)
|
||||||
$(CC) $(CFLAGS) $^ -o $@
|
gcc $^ -o $@
|
||||||
|
|
||||||
$(OBJS): build/%.o: src/%.c
|
$(OBJS): build/%.o: src/%.c
|
||||||
@mkdir -p build
|
@mkdir -p build
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
gcc $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
.PHONY: install clean
|
|
||||||
install: kilo
|
|
||||||
cp kilo ~/bin
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf build
|
rm -rf build kilo
|
||||||
rm -f ./kilo
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
-include $(DEPS)
|
-include $(DEPS)
|
||||||
|
|
|
@ -25,6 +25,7 @@ void input_process_key(KEY c) {
|
||||||
|
|
||||||
case DEL:
|
case DEL:
|
||||||
input_process_key(ARROW_RIGHT);
|
input_process_key(ARROW_RIGHT);
|
||||||
|
// fall through
|
||||||
case BACKSPACE:
|
case BACKSPACE:
|
||||||
case CTRL_KEY('H'):
|
case CTRL_KEY('H'):
|
||||||
command_delete_char();
|
command_delete_char();
|
||||||
|
|
Reference in a new issue