-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (36 loc) · 1.45 KB
/
Makefile
File metadata and controls
46 lines (36 loc) · 1.45 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ehugh-be <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/10/29 15:05:00 by ehugh-be #+# #+# #
# Updated: 2019/01/17 17:37:34 by bparker ### ########.fr #
# #
# **************************************************************************** #
NAME = fdf
SRC = $(wildcard *.c)
OBJ=$(SRC:.c=.o)
CC = clang
CFLAGS = -Wall -Wextra -Werror
LIB = libft/libft.a
LIBDIR = libft/
LIBSPATH = -I libft/ -I /usr/local/include/
HDR = fdf.h
LINK = -lmlx -framework OpenGL -framework AppKit -L /usr/local/lib/
all: lib $(OBJ) $(NAME)
$(NAME): $(LIB) $(OBJ)
$(CC) $(CFLAGS) $(LIBSPATH) -o $(NAME) $(LINK) $(LIB) $(OBJ)
lib:
make -C $(LIBDIR)
%.o: %.c $(HDR) $(LIB)
$(CC) $(CFLAGS) -c $< -o $@
fclean: clean
/bin/rm -f $(NAME)
make -C $(LIBDIR) fclean
clean: cleanlib
/bin/rm -f $(OBJ)
cleanlib:
make -C $(LIBDIR) clean
re: fclean all