mirror of
https://github.com/kiedtl/fire.git
synced 2024-11-16 04:56:38 +00:00
39 lines
710 B
Makefile
39 lines
710 B
Makefile
#
|
|
# 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
|
|
|
|
INC = -Isub/termbox_next/src -Isub/ccommon/
|
|
|
|
CC = clang
|
|
CFLAGS = -g -std=c99 $(WARNING) $(INC)
|
|
LDFLAGS = -fuse-ld=lld
|
|
|
|
TRMBOX = sub/termbox_next/bin/termbox.a
|
|
SRC = main.c draw.c
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
all: $(NAME)
|
|
|
|
clean:
|
|
rm -f $(NAME) $(OBJ)
|
|
|
|
.c.o:
|
|
@echo "\tCC\t\t$@"
|
|
@$(CC) $(CFLAGS) -c $<
|
|
|
|
$(TRMBOX):
|
|
@echo "\tCC\t\ttermbox.c"
|
|
@cd sub/termbox_next/ && (make >/dev/null)
|
|
|
|
$(NAME): $(OBJ) $(TRMBOX)
|
|
@echo "\tLD\t\t$(NAME)"
|
|
@$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
|
|
|
|
.PHONY: all clean
|