-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (37 loc) · 1.67 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: msidqi <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/11/23 00:08:25 by msidqi #+# #+# #
# Updated: 2018/11/25 22:04:07 by msidqi ### ########.fr #
# #
# **************************************************************************** #
LIBFT = libft.a
LIBFTL = src/libft/libft.a
EXE = fractol
SRC = src/ft_event_system.c src/ft_events_keyboard.c src/main.c src/ft_events.c src/ft_image_setup.c
INCLUDE = Include
OBJ = ft_events_keyboard.o ft_image_setup.o main.o ft_event_system.o ft_events.o
GLIB = libgl.a
CC = gcc -O3 -Wall -Wextra -Werror
FLAGS = -lmlx -framework OpenGl -framework Appkit
OPENCL = -std=c99 -DUNIX -g -DDEBUG -DMAC -arch x86_64 -framework OpenCL
all : $(EXE)
$(GLIB) :
$(CC) -c $(SRC) -I $(INCLUDE)
ar rc $(GLIB) $(OBJ)
ranlib $(GLIB)
$(LIBFTL) :
make -C src/libft
$(EXE) : $(LIBFTL) $(GLIB)
$(CC) -o $(EXE) $(SRC) $(GLIB) src/libft/libft.a -I $(INCLUDE) $(FLAGS) $(OPENCL)
clean :
rm -rf $(OBJ) $(GLIB) $(LIBFTL)
make clean -C src/libft
fclean : clean
rm -rf $(EXE)
make fclean -C src/libft
re : fclean all