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 11:00:53 +02:00
|
|
|
# Updated: 2022/04/29 10:00:15 by gbaconni ### ########.fr #
|
2022-04-17 09:59:41 +02:00
|
|
|
# #
|
|
|
|
|
# **************************************************************************** #
|
|
|
|
|
|
2022-04-29 11:00:53 +02:00
|
|
|
KERNEL = $(shell uname -s)
|
|
|
|
|
MACHINE = $(shell uname -m)
|
2022-04-17 09:59:41 +02:00
|
|
|
|
|
|
|
|
all: test
|
|
|
|
|
|
2022-04-29 11:00:53 +02:00
|
|
|
libftprintf.a: libftprintf
|
2022-04-17 09:59:41 +02:00
|
|
|
@ln -snf ../libftprintf/libftprintf.a libftprintf.a
|
|
|
|
|
|
2022-04-29 11:00:53 +02:00
|
|
|
libftprintf:
|
|
|
|
|
@make -C ../libftprintf bonus
|
|
|
|
|
|
|
|
|
|
bonus: test-pft
|
|
|
|
|
|
2022-04-17 09:59:41 +02:00
|
|
|
test: test-pft
|
|
|
|
|
|
2022-04-29 11:00:53 +02:00
|
|
|
test2: test-pft2
|
|
|
|
|
|
|
|
|
|
test3: test-pft3
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
pft: libftprintf.a
|
2022-04-17 09:59:41 +02:00
|
|
|
@test -d pft || git clone https://github.com/gavinfielder/pft.git pft
|
2022-04-29 11:00:53 +02:00
|
|
|
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
|
2022-04-29 11:00:53 +02:00
|
|
|
endif
|
|
|
|
|
ifeq ($(KERNEL),Darwin)
|
2022-04-17 09:59:41 +02:00
|
|
|
endif
|
|
|
|
|
@make -C pft
|
|
|
|
|
|
2022-04-29 11:00:53 +02:00
|
|
|
clean:
|
|
|
|
|
@make -C pft clean
|
|
|
|
|
|
|
|
|
|
fclean:
|
|
|
|
|
@rm -fr pft
|
2022-04-17 09:59:41 +02:00
|
|
|
|