diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | src/main.c | 7 |
2 files changed, 7 insertions, 3 deletions
@@ -53,7 +53,8 @@ ${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS_DIR}${INCS} -I${INCS_DIR} -o $@ $< #------------------------------------------------------------------------------# ${NAME}: ${OBJS} - ${CC} ${CFLAGS} -o $@ $< -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm + ${CC} ${CFLAGS} -o $@ $< -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm \ +-framework OpenGL -framework AppKit #------------------------------------------------------------------------------# all: @$(MAKE) --no-print-directory -C ${MLX_DIR} all @@ -2,14 +2,17 @@ #include <mlx.h> #include <stdlib.h> -int main(void) { +int + main(void) +{ void *win; void *winptr; win = mlx_init(); winptr = (void*)malloc(800 * 600); winptr = mlx_new_window(win, 800, 600, "Cub3d"); - free(win); + mlx_loop(win); free(winptr); + free(win); return (0); } |