2020-02-08 04:46:43 +00:00
|
|
|
BIN := ke
|
2020-02-08 08:40:21 +00:00
|
|
|
OBJS := main.o
|
2020-02-08 04:46:43 +00:00
|
|
|
|
2020-02-08 10:22:31 +00:00
|
|
|
LDFLAGS :=
|
|
|
|
CFLAGS := -pedantic -Wall -Werror -Wextra -O2 -std=c99 -g
|
2020-02-08 04:46:43 +00:00
|
|
|
|
|
|
|
.PHONY: all
|
2020-02-08 10:22:31 +00:00
|
|
|
all: build run
|
2020-02-08 04:46:43 +00:00
|
|
|
|
2020-02-08 10:22:31 +00:00
|
|
|
.PHONY: build
|
|
|
|
build: $(BIN)
|
|
|
|
|
|
|
|
$(BIN): main.c
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ main.c
|
2020-02-08 04:46:43 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2020-02-08 10:22:31 +00:00
|
|
|
rm -f $(BIN) $(OBJS) *.core
|
2020-02-08 04:46:43 +00:00
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
run: $(BIN)
|
2020-02-08 07:07:59 +00:00
|
|
|
reset
|
2020-02-09 06:23:32 +00:00
|
|
|
./$(BIN) escapes.txt
|
2020-02-08 04:46:43 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c $@ $<
|