kst/ke/Makefile

30 lines
424 B
Makefile

BIN := ke
OBJS := main.o
LDFLAGS :=
CFLAGS := -pedantic -Wall -Werror -Wextra -O2 -std=c99 -g
.PHONY: all
all: build
.PHONY: build
build: $(BIN)
$(BIN): main.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ main.c
.PHONY: clean
clean:
rm -f $(BIN) $(OBJS) *.core keypress
.PHONY: run
run: $(BIN)
reset
./$(BIN) hello.txt
keypress: keypress.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ keypress.c
%.o: %.c
$(CC) $(CFLAGS) -c $@ $<