-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (49 loc) · 1.92 KB
/
Copy pathMakefile
File metadata and controls
57 lines (49 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: atok <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/11/01 11:09:26 by atok #+# #+# #
# Updated: 2022/11/07 13:46:58 by atok ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
CC = gcc
RM = rm -rf
AR = ar rcs
INCLUDE = ft_printf.h
CFLAGS = -Wall -Wextra -Werror -I $(INCLUDE)
SRC = ft_printf.c ft_putchar.c ft_putstr.c ft_pointer.c ft_number.c ft_unsigned.c ft_hex.c ft_percent.c
OBJS = $(SRC:.c=.o)
$(NAME): $(OBJS)
$(AR) $(NAME) $(OBJS)
all: $(NAME)
clean:
$(RM) $(OBJS)
fclean: clean
$(RM) $(NAME)
re: fclean all
# name = .a archive file output name
# cc = compiler used
# rm = remove cmd + -rf remove evne the content inside
# ar = create archive .a file [man ar]
# r=library alreaxy existed replace old with new
# c=create library if it did not exist
# s=apply index to eachfile/content and sort
# replce,create & sort
# cflags = to view all extra compiler warning/error message
# include = .h header file to link protoype
# src = .c files
# obj = .o compiled files
# .c.o = %.o : %.c (new for GNU)
# the cmd to compile .c to .o
# all = 'make' command
# clean = remove all .o
# fclean = remove all.o & .a
# re = re-make
# to use = 'make' to run program
# 'make clean'
# 'make fclean'
# 'make re'