diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -6,15 +6,17 @@ # By: cacharle <marvin@42.fr> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2019/10/08 15:45:53 by cacharle #+# #+# # -# Updated: 2019/11/21 03:43:46 by cacharle ### ########.fr # +# Updated: 2020/01/15 07:34:57 by cacharle ### ########.fr # # # # **************************************************************************** # LIB = ar rcs RM = rm -f +GET_NEXT_LINE_DIR = get_next_line + CC = gcc -CCFLAGS = -Wall -Wextra -Werror +CCFLAGS = -I. -I$(GET_NEXT_LINE_DIR) -Wall -Wextra -Werror NAME = libft.a SRC = ft_atoi.c ft_bzero.c ft_isalnum.c ft_isalpha.c ft_isascii.c ft_isdigit.c \ @@ -28,12 +30,15 @@ SRC = ft_atoi.c ft_bzero.c ft_isalnum.c ft_isalpha.c ft_isascii.c ft_isdigit.c \ ft_strncmp.c ft_strncpy.c ft_strnequ.c ft_strnew.c ft_strnstr.c \ ft_strrchr.c ft_split.c ft_strstr.c ft_substr.c ft_strtrim.c \ ft_tolower.c ft_toupper.c ft_strlcpy.c ft_calloc.c ft_strndup.c \ - ft_strjoin_free.c ft_strjoin_free_snd.c get_next_line.c ft_strcount.c \ - ft_printf.c ft_sprintf.c ft_snprintf.c ft_asprintf.c ft_dprintf.c \ - ft_vprintf.c ft_vsprintf.c ft_vsnprintf.c ft_vasprintf.c ft_vdprintf.c + ft_strjoin_free.c ft_strjoin_free_snd.c ft_strcount.c + # ft_printf.c ft_sprintf.c ft_snprintf.c ft_asprintf.c ft_dprintf.c \ + # ft_vprintf.c ft_vsprintf.c ft_vsnprintf.c ft_vasprintf.c ft_vdprintf.c +SRC += $(GET_NEXT_LINE_DIR)/get_next_line.c + OBJ = $(SRC:.c=.o) -INCLUDE = libft.h + +HEADER = libft.h BONUSSRC = ft_lstadd_back_bonus.c ft_lstadd_front_bonus.c ft_lstclear_bonus.c \ ft_lstdelone_bonus.c ft_lstiter_bonus.c ft_lstlast_bonus.c \ ft_lstmap_bonus.c ft_lstnew_bonus.c ft_lstsize_bonus.c ft_lstpop_front_bonus.c @@ -41,10 +46,10 @@ BONUSOBJ = $(BONUSSRC:.c=.o) all: $(NAME) -$(NAME): $(OBJ) $(INCLUDE) +$(NAME): $(OBJ) $(HEADER) $(LIB) $(NAME) $(OBJ) -bonus: $(BONUSOBJ) $(INCLUDE) +bonus: $(BONUSOBJ) $(HEADER) $(LIB) $(NAME) $(BONUSOBJ) %.o: %.c @@ -59,6 +64,3 @@ fclean: clean re: fclean all rebonus: fclean bonus - -so: $(OBJ) $(BONUSOBJ) $(INCLUDE) - $(CC) -shared -fPIC -Wl,-soname,libft.so -o libft.so $(OBJ) $(BONUSOBJ) |
