aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 5389a10..9013acc 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,13 @@ CCFLAGS = -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 ft_isprint.c \
- ft_memccpy.c ft_memchr.c ft_memcmp.c ft_memcpy.c ft_memmove.c ft_memset.c ft_strcat.c \
- ft_strchr.c ft_strcmp.c ft_strcpy.c ft_strdup.c ft_strlcat.c ft_strlen.c ft_strncat.c \
- ft_strncmp.c ft_strncpy.c ft_strnstr.c ft_strrchr.c ft_strstr.c ft_tolower.c \
+ ft_itoa.c ft_memalloc.c ft_memccpy.c ft_memchr.c ft_memcmp.c ft_memcpy.c ft_memdel.c \
+ ft_memmove.c ft_memset.c ft_putchar.c ft_putchar_fd.c ft_putendl.c ft_putendl_fd.c \
+ ft_putnbr.c ft_putnbr_fd.c ft_putstr.c ft_putstr_fd.c ft_strcat.c ft_strchr.c \
+ ft_strclr.c ft_strcmp.c ft_strcpy.c ft_strdel.c ft_strdup.c ft_strequ.c ft_striter.c \
+ ft_striteri.c ft_strjoin.c ft_strlcat.c ft_strlen.c ft_strmap.c ft_strmapi.c \
+ ft_strncat.c ft_strncmp.c ft_strncpy.c ft_strnequ.c ft_strnew.c ft_strnstr.c \
+ ft_strrchr.c ft_strsplit.c ft_strstr.c ft_strsub.c ft_strtrim.c ft_tolower.c \
ft_toupper.c
OBJ = $(SRC:.c=.o)
@@ -15,7 +19,7 @@ $(NAME): $(OBJ) libft.h
ar rc $(NAME) $(OBJ)
%.o: %.c
- $(CC) $(CCFLAGS) -c -o $@ $<
+ $(CC) $(CCFLAGS) -fPIC -c -o $@ $< # /!\ fPIC
clean:
rm -f $(OBJ)
@@ -26,4 +30,4 @@ fclean: clean
re: fclean all
so: $(OBJ) libft.h
- $(CC) -shared -Wl,-soname,libft.so -o libft.so $(OBJ)
+ $(CC) -shared -fPIC -Wl,-soname,libft.so -o libft.so $(OBJ)