kst/ke/Makefile

37 lines
553 B
Makefile
Raw Normal View History

BIN := ke
2020-02-13 01:37:28 +00:00
OBJS := main.o
2020-02-11 06:02:11 +00:00
LDFLAGS :=
2020-02-12 22:28:34 +00:00
CFLAGS := -pedantic -Wall -Werror -Wextra -O2 -std=c99 -g -fno-builtin-memmove
.PHONY: all
2020-02-12 22:28:34 +00:00
all: build install
2020-02-08 10:22:31 +00:00
.PHONY: build
build: $(BIN)
2020-02-12 01:16:31 +00:00
$(BIN): $(OBJS) defs.h
2020-02-11 17:52:49 +00:00
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
.PHONY: clean
clean:
2020-02-11 06:02:11 +00:00
rm -f $(BIN) $(OBJS) *.core keypress
.PHONY: run
run: $(BIN)
2020-02-08 07:07:59 +00:00
reset
2020-02-11 06:02:11 +00:00
./$(BIN) hello.txt
keypress: keypress.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ keypress.c
2020-02-11 08:30:21 +00:00
.PHONY: install
install: $(BIN)
2020-02-12 22:28:34 +00:00
install -C $(BIN) $(HOME)/bin/
2020-02-11 08:30:21 +00:00
2020-02-13 01:11:32 +00:00
.PHONY: cloc
cloc:
cloc main.c defs.h abuf.c erow.c
%.o: %.c