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
|
|
|
|
|
2020-03-09 16:29:38 +00:00
|
|
|
INC = -Isub/termbox_next/src
|
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
|
|
|
|
2019-12-14 21:25:12 +00:00
|
|
|
DESTDIR = /
|
|
|
|
PREFIX = /usr/local/
|
|
|
|
|
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)"
|
2020-03-09 16:35:10 +00:00
|
|
|
@$(CC) -o $(NAME) $(OBJ) $(TRMBOX) $(CFLAGS) $(LDFLAGS)
|
2019-12-12 15:01:43 +00:00
|
|
|
|
2019-12-13 14:43:38 +00:00
|
|
|
install: $(NAME)
|
2019-12-14 21:25:12 +00:00
|
|
|
@echo "\tINSTALL\t\t$(NAME)\t$(DESTDIR)/$(PREFIX)/bin/$(NAME)"
|
|
|
|
@install -m755 ./$(NAME) $(DESTDIR)/$(PREFIX)/bin/$(NAME)
|
2019-12-13 14:43:38 +00:00
|
|
|
|
2019-12-14 21:25:12 +00:00
|
|
|
uninstall:
|
|
|
|
@echo "\tRM\t\t$(DESTDIR)/$(PREFIX)/bin/$(NAME)"
|
|
|
|
@rm -f $(DESTDIR)/$(PREFIX)/bin/$(NAME)
|
2019-12-13 14:43:38 +00:00
|
|
|
.PHONY: all clean install
|