You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

68 lines
2.2 KiB

# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: hroussea <hroussea@student.42lyon.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/11/23 14:23:19 by hroussea #+# #+# #
# Updated: 2021/06/08 17:07:00 by hroussea ### ########lyon.fr #
# #
# **************************************************************************** #
MOD_STRING_SRCS_RAW = ft_atoi.c ft_isalnum.c ft_isalpha.c ft_isascii.c \
ft_isdigit.c ft_isprint.c ft_isspace.c ft_memchr.c \
ft_memcmp.c ft_memcpy.c ft_memmove.c ft_memset.c \
ft_strlen.c ft_strchr.c ft_strncmp.c ft_strnstr.c \
ft_strjoin.c ft_itoa.c ft_strtrim.c ft_strdup.c \
ft_split.c ft_substr.c
MOD_STRING_SRCS = ${addprefix src/string/,${MOD_STRING_SRCS_RAW}}
MOD_VECTOR_SRCS_RAW = ft_vecalloc.c ft_vecfree.c ft_veccpy.c ft_vecnew.c \
ft_vecpush.c
MOD_VECTOR_SRCS = ${addprefix src/vector/,${MOD_VECTOR_SRCS_RAW}}
MOD_ALLOC_SRCS_RAW = ft_calloc.c
MOD_ALLOC_SRCS = ${addprefix src/alloc/,${MOD_ALLOC_SRCS_RAW}}
MOD_IO_SRCS_RAW = gnl/get_next_line.c gnl/get_next_line_2.c \
printf/ft_vecprintf.c printf/ft_printf.c
MOD_IO_SRCS = ${addprefix src/io/,${MOD_IO_SRCS_RAW}}
SRCS = ${MOD_STRING_SRCS} ${MOD_VECTOR_SRCS} ${MOD_ALLOC_SRCS} ${MOD_IO_SRCS}
OBJS = ${SRCS:.c=.o}
CC = gcc
CFLAGS = -Wall -Wextra -Werror -Iinclude -O3 -march=native
NAME = libft.a
all: showmsg ${NAME}
${NAME}: ${OBJS}
ar rcs $@ ${OBJS}
%.o: %.c
${CC} ${CFLAGS} -c $< -o $@
clean:
${RM} ${OBJS}
fclean: clean
${RM} ${NAME}
re:
${MAKE} fclean
${MAKE} all
norme:
norminette *.c *.h
getincpath:
@printf "%s%s" -I \"${shell cd include && pwd}\"
.PHONY: all clean fclean re norme showmsg getincpath