Skip to content

Commit

Permalink
hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatih Cil committed Feb 3, 2022
1 parent 4b04ce4 commit 714df56
Show file tree
Hide file tree
Showing 47 changed files with 10 additions and 46 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified libft/.DS_Store
Binary file not shown.
56 changes: 10 additions & 46 deletions libft/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
# By: fcil <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/01/11 17:58:34 by fcil #+# #+# #
# Updated: 2022/02/02 16:55:20 by fcil ### ########.fr #
# Updated: 2022/02/03 16:48:18 by fcil ### ########.fr #
# #
# **************************************************************************** #

NAME = libft.a
CC = clang
CC = gcc
FLAGS = -Wall -Wextra -Werror
SRC=$(wildcard src/*.c)

SRC = $(shell find . -type f ! -name "ft_lst*.c" -name "ft_*.c")

OBJ = $(SRC:.c=.o)
BSRC := $(wildcard ft_lst*.c)
B_OBJ := $(BSRC:%.c=%.o)

%.o: %.c
$(CC) $(FLAGS) -c $< -o $@
Expand All @@ -25,8 +28,10 @@ $(NAME): $(OBJ)

all: $(NAME)

bonus: $(OBJ) $(B_OBJ)
ar -rc $(NAME) $(OBJ) $(B_OBJ)
clean:
rm -f $(OBJ)
rm -f *.o

fclean: clean
rm -f $(NAME)
Expand All @@ -35,45 +40,4 @@ re: fclean all

main: main.c $(NAME)
$(CC) $(FLAGS) main.c $(NAME) -o main
./main


# NAME = libft.a
# CC = clang
# FLAGS = -Wall -Wextra -Werror
# SOURCE = ft_isalnum.c ft_isprint.c ft_memcmp.c ft_putchar_fd.c ft_split.c \
# ft_strlcat.c ft_strncmp.c ft_substr.c ft_atoi.c ft_isalpha.c \
# ft_itoa.c ft_memcpy.c ft_putendl_fd.c ft_strchr.c ft_strlcpy.c \
# ft_strnstr.c ft_tolower.c ft_bzero.c ft_isascii.c \
# ft_memmove.c ft_putnbr_fd.c ft_strdup.c ft_strlen.c ft_strrchr.c \
# ft_toupper.c ft_calloc.c ft_isdigit.c ft_memchr.c ft_memset.c \
# ft_putstr_fd.c ft_strjoin.c ft_strmapi.c ft_strtrim.c ft_striteri.c
# OBJ = $(SOURCE:.c=.o)
# BONUS = ft_lstnew.c ft_lstadd_front.c ft_lstadd_back.c ft_lstsize.c \
# ft_lstlast.c ft_lstdelone.c ft_lstclear.c
# B_OBJ = $(BONUS:.c=.o)

# %.o: %.c
# $(CC) $(FLAGS) -c $< -o $@

# all: $(NAME)

# $(NAME): $(OBJ)
# ar -rc $(NAME) $(OBJ)

# bonus: $(B_OBJ)
# ar -rc $(NAME) $(B_OBJ)

# clean:
# rm -f $(OBJ) $(B_OBJ)

# fclean: clean
# rm -f $(NAME)

# re: fclean all

# .PHONY: all clean fclean re main bonus

# main: main.c $(OBJ) $(NAME)
# $(CC) -lbsd $(FLAGS) main.c $(NAME) -o main
# ./main
./main
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 714df56

Please sign in to comment.