-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (25 loc) · 714 Bytes
/
Makefile
File metadata and controls
39 lines (25 loc) · 714 Bytes
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
NAME = ./mlx_imgui
SRCS = main.c Loader.c Vulkan.c
OBJ_DIR = objs
OBJS = $(addprefix $(OBJ_DIR)/, $(SRCS:.c=.o))
CC = clang
CFLAGS = -I MacroLibX/includes -g3 -D VULKAN_NO_PROTOTYPES -D IMGUI_IMPL_VULKAN_NO_PROTOTYPES -D CIMGUI_USE_VULKAN -D CIMGUI_USE_SDL2
CLIBS = cimgui/cimgui.so MacroLibX/libmlx.so -lSDL2
RM = rm -rf
$(OBJ_DIR)/%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
all: cimgui mlx $(NAME)
cimgui:
@make -f cimgui.mk -j12
mlx:
@make -C MacroLibX -j12
$(NAME): $(OBJ_DIR) $(OBJS)
$(CC) -o $(NAME) $(CLIBS) $(OBJS)
$(OBJ_DIR):
mkdir -p $(sort $(addprefix $(OBJ_DIR)/, $(dir $(SRCS))))
clean:
$(RM) $(OBJ_DIR)
fclean: clean
$(RM) $(NAME)
re: fclean all
.PHONY: all clean fclean re cimgui mlx