vpath du makefile cheche a la racine de source
This commit is contained in:
BIN
.Makefile.swp
Normal file
BIN
.Makefile.swp
Normal file
Binary file not shown.
BIN
.testresults.swp
Normal file
BIN
.testresults.swp
Normal file
Binary file not shown.
35
Makefile
35
Makefile
@@ -4,13 +4,14 @@
|
||||
|
||||
NAME = libft.a
|
||||
CC = gcc
|
||||
VPATH = srcs/part1/ \
|
||||
VPATH = srcs/ \
|
||||
srcs/part1/ \
|
||||
srcs/part2/ \
|
||||
srcs/bonus/ \
|
||||
srcs/add/
|
||||
|
||||
IDIR = .
|
||||
_DEP = libft.h \
|
||||
_DEP = libft.h
|
||||
DEPS = $(_DEP:%.h=$(IDIR)/%.h)
|
||||
|
||||
CFLAGS = -I$(IDIR)
|
||||
@@ -99,6 +100,7 @@ SRCB = ft_lstnew.c \
|
||||
|
||||
OBJB = $(SRCB:%.c=$(ODIR)/%.o)
|
||||
|
||||
ECHO = "\033[33mcompiling objetcs\033[0m"
|
||||
|
||||
# - - - - - - - - - - - #
|
||||
# rules to execute #
|
||||
@@ -107,29 +109,31 @@ OBJB = $(SRCB:%.c=$(ODIR)/%.o)
|
||||
|
||||
all: $(ODIR) $(NAME)
|
||||
|
||||
echo:
|
||||
@echo "\033[33mcompiling objetcs\033[0m"
|
||||
|
||||
echob:
|
||||
@echo "\033[33mcompiling objetcs for bonus\033[0m"
|
||||
|
||||
$(ODIR):
|
||||
@echo "\033[33mcreate $(ODIR)\033[0m"
|
||||
# @echo "\033[33mcreate $(ODIR)\033[0m"
|
||||
@echo ""
|
||||
mkdir -p $(ODIR)
|
||||
ls
|
||||
@echo ""
|
||||
ls srcs/
|
||||
@echo ""
|
||||
|
||||
$(NAME): echo $(OBJS) $(DEPS)
|
||||
@echo "\033[33mbuilding $(NAME)\033[0m"
|
||||
$(NAME): $(OBJS) $(DEPS)
|
||||
# @echo "\033[33mbuilding $(NAME)\033[0m"
|
||||
ar -rc $@ $(OBJS)
|
||||
@ranlib $@
|
||||
|
||||
bonus: echob $(OBJB)
|
||||
@echo "\033[33madding the bonus functions to $(NAME)\033[0m"
|
||||
bonus: $(OBJB)
|
||||
# @echo "\033[33madding the bonus functions to $(NAME)\033[0m"
|
||||
ar -rc $(NAME) $(OBJB)
|
||||
@ranlib $(NAME)
|
||||
|
||||
$(ODIR)/%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
announce:
|
||||
@echo $(ECHO)
|
||||
|
||||
clean:
|
||||
/bin/rm -rf $(ODIR)
|
||||
|
||||
@@ -724,6 +728,11 @@ re: fclean all
|
||||
# creates the list of .o from the .c with addition of the
|
||||
# path directory "builds/main.o"
|
||||
#
|
||||
# it could be :
|
||||
# $(patsubst %.c,$(ODIR)/%.o,$(SRCS))
|
||||
# or :
|
||||
# $(addprefix $(ODIR)/, $(SRCS:.c=.o))
|
||||
#
|
||||
# -----
|
||||
#
|
||||
# $(NAME): $(OBJS) $(DEPS)
|
||||
|
||||
BIN
builds/ft_any.o
BIN
builds/ft_any.o
Binary file not shown.
Binary file not shown.
BIN
builds/ft_atoi.o
BIN
builds/ft_atoi.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
builds/ft_itoa.o
BIN
builds/ft_itoa.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
libft.h
2
libft.h
@@ -6,7 +6,7 @@
|
||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/11/25 14:45:53 by hulamy #+# #+# */
|
||||
/* Updated: 2019/11/25 17:11:09 by hulamy ### ########.fr */
|
||||
/* Updated: 2019/11/26 18:46:22 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/11/25 14:00:13 by hulamy #+# #+# */
|
||||
/* Updated: 2019/11/25 15:54:07 by hulamy ### ########.fr */
|
||||
/* Updated: 2019/11/26 16:18:35 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/11/25 14:01:58 by hulamy #+# #+# */
|
||||
/* Updated: 2019/11/25 14:19:11 by hulamy ### ########.fr */
|
||||
/* Updated: 2019/11/26 16:18:25 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
15
testresults
Normal file
15
testresults
Normal file
@@ -0,0 +1,15 @@
|
||||
memcpy:
|
||||
does not behave well with null as both params with size
|
||||
memmove:
|
||||
does not work well with null as both parameters and size
|
||||
calloc:
|
||||
does not work with 0 size
|
||||
lstlast:
|
||||
does not work with basic input
|
||||
lstclear:
|
||||
does not free the list
|
||||
does not work with basic input
|
||||
lstiter:
|
||||
does not work with basic input
|
||||
lstmap:
|
||||
does not work with basic input
|
||||
Reference in New Issue
Block a user