-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (32 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mli <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/06/27 15:59:43 by mli #+# #+# #
# Updated: 2020/06/27 20:51:37 by mli ### ########.fr #
# #
# **************************************************************************** #
NAME = mlibasm.a
CC = clang
CFLAGS = -Wall -Wextra -Werror -I./
SRCS_FILES = test.c utils.c lstutils.c
SRCS_PATH = ./srcs/
SRCS = ${addprefix ${SRCS_PATH}, ${SRCS_FILES}}
OBJ_PATH = ./obj/
OBJS = ${addprefix ${OBJ_PATH}, ${SRCS:.c=.o}}
${NAME}: ${OBJ_PATH} ${OBJS}
@ar rcs ${NAME} ${OBJS}
${OBJ_PATH}:
@mkdir -p ${OBJ_PATH}/${SRCS_PATH}
${OBJ_PATH}%.o:%.c
@${CC} ${CFLAGS} -c $< -o $@
all : ${NAME}
clean:
@rm -rf ${OBJ_PATH}
fclean: clean
@rm -rf ${NAME}
re: fclean all
.PHONY: all clean fclean re