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