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
|
|
|
|
|
|
|
LDFLAGS := -static
|
|
|
|
CFLAGS := -pedantic -Wall -Werror -Wextra -O2 -std=c99
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: $(BIN) run
|
|
|
|
|
|
|
|
$(BIN): $(OBJS)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $(OBJS)
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f $(BIN) $(OBJS)
|
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
run: $(BIN)
|
2020-02-08 07:07:59 +00:00
|
|
|
reset
|
2020-02-08 04:46:43 +00:00
|
|
|
./$(BIN)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c $@ $<
|