0
0
Files

74 lines
1.9 KiB
Makefile
Raw Permalink Normal View History

2021-08-21 13:48:07 +02:00
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gbaconni <gbaconni@42lausanne.ch> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/08/21 11:01:00 by gbaconni #+# #+# #
# Updated: 2021/08/21 11:59:26 by gbaconni ### ########.fr #
# #
# **************************************************************************** #
#
# make fclean
# make
#
NAME = "rush-02"
DICT = "numbers.dict"
SRC = main.c \
ft_errors.c
HDR = ft.errors.h
all: $(NAME)
@echo "all"
$(NAME): compile
@echo "$(NAME)"
clean:
@echo "cleanning all objects"
@/bin/rm -f *.o
fclean: clean
@echo "cleanning $(NAME)"
@/bin/rm -f "$(NAME)"
re: fclean all
norminette:
@norminette -R CheckDefine $(HDR)
@norminette -R CheckForbiddenSourceHeader $(SRC)
macro:
@cpp $(SRC)
compile:
@cc -Wall -Wextra -Werror -o $(NAME) $(SRC)
@chmod +x $(NAME)
test:
@echo "Expected: forty two"
./$(NAME) 42 | cat -e
@echo "Expected: zero"
./$(NAME) 0 | cat -e
@echo "Expected: error"
./$(NAME) 10.4 | cat -e
@echo "Expected: one hundred thousand"
./$(NAME) 100000 | cat -e
@echo "Expected: 20 : hey everybody !"
grep "20" $(DICT) | cat -e
@echo "Expected: hey everybody !"
./$(NAME) 20 | cat -e
git-clone:
@git clone git@vogsphere.42lausanne.ch:vogsphere/intra-uuid-43aa272e-0de1-4199-8bd8-51ca85234f84-3736481 .
@grep -o 'git@.*' .git/config
git: git-clone