Files
ft_printf/tests/Makefile

85 lines
2.5 KiB
Makefile
Raw Normal View History

2022-04-17 09:59:41 +02:00
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/04/16 20:12:38 by gbaconni #+# #+# #
2022-04-29 18:00:03 +02:00
# Updated: 2022/04/29 17:59:32 by gbaconni ### ########.fr #
2022-04-17 09:59:41 +02:00
# #
# **************************************************************************** #
KERNEL = $(shell uname -s)
MACHINE = $(shell uname -m)
2022-04-17 09:59:41 +02:00
all: test
2022-04-29 17:50:40 +02:00
libftprintf.a:
@ln -snf ../libftprintf/libftprintf/libftprintf.a libftprintf.a
2022-04-17 09:59:41 +02:00
libftprintf:
2022-04-29 17:50:40 +02:00
@ln -snf ../libftprintf/libftprintf libftprintf
bonus:
@make -C ../libftprintf/libftprintf bonus
bonus: test-pft
2022-04-29 18:00:03 +02:00
test: test-pft test-printftester
2022-04-17 09:59:41 +02:00
2022-04-29 18:00:03 +02:00
test2: test-pft2 test-printftester2
2022-04-29 18:00:03 +02:00
test3: test-pft3 test-printftester3
test-pft:
@cd pft && ./test mix
test-pft2:
@cd pft && ./test
test-pft3:
@cd pft && ./test c
@cd pft && ./test s
@cd pft && ./test p
@cd pft && ./test d
@cd pft && ./test i
@cd pft && ./test u
@cd pft && ./test x
@cd pft && ./test X
2022-04-29 18:00:03 +02:00
test-printftester:
@make -C printftester m
test-printftester2:
@make -C printftester b
test-printftester3:
@make -C printftester a
2022-04-29 17:50:40 +02:00
printftester: bonus libftprintf
@test -d ~/goinfre/ || ln -snf /goinfre/$(USER) ~/goinfre
@test -d ~/goinfre/docker/ || install -d ~/goinfre/docker
@test -d ~/goinfre/agent/ || install -d ~/goinfre/agent
@test -d ~/.docker/ || ln -snf ~/goinfre/docker ~/.docker
@test -d ~/Library/Containers || ln -snf ~/goinfre/agent ~/Library/Containers/com.docker.docker
@test -d printftester || git clone https://github.com/Tripouille/printfTester.git printftester
@grep -qF '../libftprintf' Makefile && sed -i '' 's/\(\.\.\)/\1\/libftprintf/' Makefile
pft: bonus libftprintf.a
2022-04-17 09:59:41 +02:00
@test -d pft || git clone https://github.com/gavinfielder/pft.git pft
ifeq ($(KERNEL),Linux)
2022-04-17 09:59:41 +02:00
@which php >/dev/null 2>&1 || sudo apt-get install -qq -y php-cli
@sed -i -r 's/^(INCLUDE_LIBPTHREAD)=.*/\1=1/' pft/options-config.ini
endif
ifeq ($(KERNEL),Darwin)
2022-04-17 09:59:41 +02:00
endif
@make -C pft
clean:
@make -C pft clean
fclean:
@rm -fr pft
2022-04-17 09:59:41 +02:00