start rewrite

This commit is contained in:
2020-02-12 02:40:45 +02:00
parent e4bd49d3dc
commit 2729a02ecd
6 changed files with 232 additions and 0 deletions

31
kte/Makefile Normal file
View File

@@ -0,0 +1,31 @@
BIN := kte
OBJS := main.o terminal.o input.o
LDFLAGS := -lncurses
CFLAGS := -pedantic -Wall -Werror -Wextra -O0 -std=c99 -g
.PHONY: all
all: build
.PHONY: build
build: $(BIN)
$(BIN): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
.PHONY: clean
clean:
rm -f $(BIN) $(OBJS) *.core
.PHONY: run
run: $(BIN)
reset
./$(BIN) hello.txt
.PHONY: install
install: $(BIN)
cp $(BIN) $(HOME)/bin/
%.o: %.c
$(CC) $(CFLAGS) -c $<