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-13 03:27:13 +00:00
|
|
|
INC = -Isub/termbox_next/src -Isub/ccommon/
|
2019-12-12 23:46:24 +00:00
|
|
|
|
2019-12-13 15:01:20 +00:00
|
|
|
CC = gcc
|
2019-12-13 14:44:13 +00:00
|
|
|
CFLAGS = -std=c99 -O3 $(WARNING) $(INC)
|
2019-12-13 21:15:29 +00:00
|
|
|
LDFLAGS =
|
2019-12-12 15:01:43 +00:00
|
|
|
|
2019-12-13 02:18:56 +00:00
|
|
|
TRMBOX = sub/termbox_next/bin/termbox.a
|
2019-12-13 03:27:13 +00:00
|
|
|
SRC = main.c draw.c
|
|
|
|
OBJ = $(SRC:.c=.o)
|
2019-12-12 15:01:43 +00:00
|
|
|
|
|
|
|
all: $(NAME)
|
|
|
|
|
|
|
|
clean:
|
2019-12-12 23:53:07 +00:00
|
|
|
rm -f $(NAME) $(OBJ)
|
2019-12-12 15:01:43 +00:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
@echo "\tCC\t\t$@"
|
2019-12-12 23:53:07 +00:00
|
|
|
@$(CC) $(CFLAGS) -c $<
|
2019-12-12 15:01:43 +00:00
|
|
|
|
2019-12-13 02:18:56 +00:00
|
|
|
$(TRMBOX):
|
|
|
|
@echo "\tCC\t\ttermbox.c"
|
2019-12-13 03:27:13 +00:00
|
|
|
@cd sub/termbox_next/ && (make >/dev/null)
|
2019-12-13 02:18:56 +00:00
|
|
|
|
|
|
|
$(NAME): $(OBJ) $(TRMBOX)
|
2019-12-12 15:01:43 +00:00
|
|
|
@echo "\tLD\t\t$(NAME)"
|
2019-12-12 23:53:07 +00:00
|
|
|
@$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
|
2019-12-12 15:01:43 +00:00
|
|
|
|
2019-12-13 14:43:38 +00:00
|
|
|
install: $(NAME)
|
2019-12-13 21:53:39 +00:00
|
|
|
@echo "\tINSTALL\t$(NAME)\t/usr/bin/$(NAME)"
|
|
|
|
@install -m755 ./$(NAME) /usr/bin/$(NAME)
|
2019-12-13 14:43:38 +00:00
|
|
|
|
|
|
|
.PHONY: all clean install
|