-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (49 loc) · 1.72 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
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: lravier <marvin@codam.nl> +#+ #
# +#+ #
# Created: 2019/04/18 08:51:33 by lravier #+# #+# #
# Updated: 2019/05/08 12:11:47 by lravier ######## odam.nl #
# #
# **************************************************************************** #
NAME = test
SRC = test_main.c \
ldouble_test.c \
int_test.c \
uint_test.c \
uint_test_zero.c\
int_test_zero.c \
char_test.c \
string_test.c \
pointer_test.c \
float_test.c \
OBJ = $(SRC:.c=.o)
SRCDIR = srcs
OBJDIR = objs
SRCS = $(addprefix $(SRCDIR)/, $(SRC))
OBJS = $(addprefix $(OBJDIR)/, $(OBJ))
HEADER = -I includes/ -I libftprintf/includes/
cc = gcc
CFLAGS = -Wall -Wextra -Werror
LIB = -L libftprintf/ -lftprintf
.PHONY: all clean fclean re
.SUFFIXES: .c .o
all: $(NAME)
$(NAME): $(OBJS)
make -C libftprintf/
$(CC) -o $(NAME) $(CFLAGS) $(OBJS) $(HEADER) $(LIB)
$(OBJS): $(SRCS)
/bin/mkdir -p $(OBJDIR)
$(CC) -c $(CFLAGS) $(SRCS) $(HEADER)
/bin/mv $(OBJ) $(OBJDIR)/
clean:
/bin/rm -Rf $(OBJDIR)
/bin/rm -Rf *~ *#
make -C libftprintf/ clean
fclean: clean
make -C libftprintf/ fclean
/bin/rm -f $(NAME)
re: fclean all