2019-12-12 15:01:43 +00:00
|
|
|
#
|
|
|
|
# fire: the pre-cambrian DOOM animation in the terminal
|
|
|
|
# (c) Kied Llaentenn
|
|
|
|
# See the LICENSE for more information
|
|
|
|
#
|
|
|
|
|
|
|
|
NAME = fire
|
|
|
|
WARNING = -Wall -Wextra -pedantic -Wmissing-prototypes \
|
|
|
|
-Wold-style-definition -Werror
|
|
|
|
|
2019-12-12 23:46:24 +00:00
|
|
|
SRCDIR = src
|
|
|
|
SUBDIR = sub
|
|
|
|
|
|
|
|
INC = -I$(SUBDIR)/termbox_next/
|
|
|
|
|
2019-12-12 15:01:43 +00:00
|
|
|
CC = clang
|
2019-12-12 23:46:24 +00:00
|
|
|
CFLAGS = -g -std=c99 $(WARNING) $(INC)
|
2019-12-12 15:01:43 +00:00
|
|
|
LDFLAGS = -fuse-ld=lld
|
|
|
|
|
|
|
|
SRC = main.c
|
|
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
|
|
|
|
all: $(NAME)
|
|
|
|
|
|
|
|
clean:
|
2019-12-12 23:46:24 +00:00
|
|
|
rm -f $(SRCDIR)/$(NAME) $(SRCDIR)/$(OBJ)
|
2019-12-12 15:01:43 +00:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
@echo "\tCC\t\t$@"
|
2019-12-12 23:46:24 +00:00
|
|
|
@$(CC) $(CFLAGS) -c $< -o $@
|
2019-12-12 15:01:43 +00:00
|
|
|
|
2019-12-12 23:46:24 +00:00
|
|
|
$(NAME): $(SRCDIR)/$(OBJ)
|
2019-12-12 15:01:43 +00:00
|
|
|
@echo "\tLD\t\t$(NAME)"
|
2019-12-12 23:46:24 +00:00
|
|
|
@$(CC) -o $(SRCDIR)/$@ $^ $(CFLAGS) $(LDFLAGS)
|
2019-12-12 15:01:43 +00:00
|
|
|
|
|
|
|
.PHONY: all clean
|