-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (36 loc) · 1.38 KB
/
Makefile
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: fsandel <fsandel@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/01/30 10:30:26 by fsandel #+# #+# #
# Updated: 2023/05/26 18:34:59 by fsandel ### ########.fr #
# #
# **************************************************************************** #
NAME = template
SRC = main.c template.c utils.c
OBJ = $(SRC:.c=.o)
CC = cc
CFLAGS =
install:
@make all
@make clean
@alias template=$(PWD)/$(NAME)
@echo >> ~/.zshrc "alias template=$(PWD)/$(NAME)"
@echo "Successfully installed template"
all: $(NAME)
$(NAME):$(OBJ)
@$(CC) -o $(NAME) $(OBJ) $(CFLAGS) $(LIBFT)
%.o:%.c
@$(CC) -o $@ -c $< $(CFLAGS)
clean:
@rm -f $(OBJ)
fclean: clean
@rm -f $(NAME)
re: fclean all
$(LIBFT):
make -C $(LIBFT_DIR)
libft: $(LIBFT)
.PHONY: all clean fclean re