29 lines
337 B
Makefile
29 lines
337 B
Makefile
NAME := aoc
|
|
FMT := c
|
|
|
|
CC := cc
|
|
CC_OPTIONS := -g -Wall -Wextra -Werror
|
|
DBG := gdb
|
|
|
|
SRCD := src
|
|
BIND := out
|
|
|
|
SRCS := $(wildcard $(SRCD)/*.$(FMT))
|
|
BIN := $(BIND)/$(NAME)
|
|
|
|
all: $(BIND) $(BIN)
|
|
|
|
run: all
|
|
$(BIN)
|
|
|
|
debug: all
|
|
$(DBG) $(BIN)
|
|
|
|
$(BIND):
|
|
mkdir $@
|
|
|
|
$(BIN): $(SRCS)
|
|
$(CC) $(CC_OPTIONS) -o $@ $^
|
|
|
|
clean:
|
|
rm -f $(wildcard $(BIND)/*)
|