kst/kte/ark/Makefile

31 lines
439 B
Makefile
Raw Permalink Normal View History

2020-02-12 00:40:45 +00:00
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 $<