-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fatih Cil
committed
Feb 3, 2022
1 parent
4b04ce4
commit 714df56
Showing
47 changed files
with
10 additions
and
46 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 $@ | ||
|
@@ -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) | ||
|
@@ -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.