-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
80 lines (54 loc) · 2.12 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: ingmar <ingmar@student.codam.nl> +#+ #
# +#+ #
# Created: 2021/05/08 14:40:19 by ingmar #+# #+# #
# Updated: 2021/05/22 20:55:18 by ingmar ######## odam.nl #
# #
# **************************************************************************** #
#
## PUSH SWAP
#
PUSH_SWAP = push_swap
PUSH_SRC = pushSwap/push_swap.c pushSwap/pre_sort.c \
pushSwap/big_ol_sorter.c pushSwap/smol_sorty.c
PUSH_OBJ = $(PUSH_SRC:.c=.o)
#
## CHECKER
#
CHECKER = checker
CHECKER_SRC = chonker/checker.c
CHECKER_OBJ = $(CHECKER_SRC:.c=.o)
#
## HELPERS
#
HELPERS_SRC = helpers/helpers.c helpers/ft_split.c
HELPERS_OBJ = $(HELPERS_SRC:.c=.o)
#
## LIBPS
#
LIBPS_SRC = libps/stack.c libps/instructions.c libps/stack_helpers.c
LIBPS_OBJ = $(LIBPS_SRC:.c=.o)
#
## LIBPS
#
GNL_SRC = getnextline/get_next_line.c
GNL_OBJ = $(GNL_SRC:.c=.o)
FLAGGOS = -Wall -Wextra -Werror -o
all: $(PUSH_SWAP) $(CHECKER)
$(PUSH_SWAP): $(PUSH_OBJ) $(HELPERS_OBJ) $(LIBPS_OBJ)
@printf "\e[0;34mCompiling push_swap\e[0;35m\n"
@$(CC) $(FLAGGOS) $(PUSH_SWAP) $(PUSH_SRC) $(HELPERS_SRC) $(LIBPS_SRC)
$(CHECKER): $(CHECKER_OBJ) $(HELPERS_OBJ) $(LIBPS_OBJ) $(GNL_OBJ)
@printf "\e[0;34mCompiling checker\e[0;35m\n"
@$(CC) $(FLAGGOS) $(CHECKER) $(CHECKER_SRC) $(HELPERS_SRC) $(LIBPS_SRC) $(GNL_SRC)
re: fclean all
clean:
@printf "\e[0;34mRemoving objects\e[0;35m\n"
@rm -f $(PUSH_OBJ) $(PUSH_OBJ) $(CHECKER_OBJ) $(HELPERS_OBJ) $(LIBPS_OBJ) $(GNL_OBJ)
fclean: clean
@printf "\e[0;34mRemoving executables\e[0;35m\n"
@rm -f $(PUSH_SWAP) $(CHECKER)