aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile61
1 files changed, 26 insertions, 35 deletions
diff --git a/Makefile b/Makefile
index 8540a0e..3a0f6c1 100644
--- a/Makefile
+++ b/Makefile
@@ -33,13 +33,21 @@ SRCS_NAME += ft_get_tex.c
SRCS_NAME += ft_get_sprite.c
SRCS_NAME += ft_get_colors.c
SRCS_NAME += ft_get_map.c
+SRCS_NAME += ft_get_map_dims.c
+SRCS_NAME += ft_get_tex_nl.c
+SRCS_NAME += ft_get_tex_extra.c
+SRCS_NAME += ft_get_path_nl.c
+SRCS_NAME += ft_get_nlvl_pos.c
SRCS_NAME += ft_get_player_spawn.c
+SRCS_NAME += ft_get_music.c
+SRCS_NAME += ft_get_darkness.c
SRCS_NAME += ft_set_minimap_scale.c
SRCS_NAME += ft_check_missing.c
SRCS_NAME += ft_check_not_found.c
SRCS_NAME += ft_check_map_line.c
+SRCS_NAME += ft_check_map_surrounds.c
SRCS_NAME += ft_free_words.c
-SRCS_NAME += ft_map_error.c
+SRCS_NAME += ft_error.c
SRCS_NAME += ft_init_winlx.c
SRCS_NAME += ft_draw_square.c
SRCS_NAME += ft_draw_circle.c
@@ -49,6 +57,8 @@ SRCS_NAME += ft_basic_keys.c
SRCS_NAME += ft_extra_keys.c
SRCS_NAME += ft_draw_verline.c
SRCS_NAME += ft_rgb_to_hex.c
+SRCS_NAME += ft_hex_to_rgb.c
+SRCS_NAME += ft_darken_rgb.c
SRCS_NAME += ft_raycasting.c
SRCS_NAME += ft_init_s_ray.c
SRCS_NAME += ft_init_map.c
@@ -62,6 +72,12 @@ SRCS_NAME += ft_key_loop.c
SRCS_NAME += ft_draw_hud.c
SRCS_NAME += ft_music.c
SRCS_NAME += ft_draw_sprite.c
+SRCS_NAME += ft_warp_level.c
+SRCS_NAME += ft_save_to_bmp.c
+SRCS_NAME += ft_treat_args.c
+SRCS_NAME += ft_init_funptr.c
+SRCS_NAME += ft_init_bmp.c
+SRCS_NAME += ft_floor_cast.c
#--------------------------------------------------------------------------------------------------#
SRCS = $(addprefix ${SRCS_DIR},${SRCS_NAME})
#--------------------------------------------------------------------------------------------------#
@@ -100,37 +116,15 @@ ifdef ASAN
CFLAGS += ${FSANITIZE}
endif
#--------------------------------------------------------------------------------------------------#
-ifdef OPTI
- ifeq (${USER}, salad)
- CFLAGS += -march=broadwell
- else ifeq (${USER}, jozan)
- CFLAGS += -march=ivybridge
- else
- CFLAGS += -march=native
- endif
- CFLAGS += -O2
- CFLAGS += -pipe
-endif
-#--------------------------------------------------------------------------------------------------#
-CDEFS = -DFT_SCR_SIZE=\"${SCR_SZE}\"
-CDEFS += -DFT_OS=\"${OS}\"
-ifneq (${OS}, Darwin)
- CDEFS += -DFT_W_KEY=119
- CDEFS += -DFT_A_KEY=97
- CDEFS += -DFT_S_KEY=115
- CDEFS += -DFT_D_KEY=100
- CDEFS += -DFT_F1_KEY=65470
- CDEFS += -DFT_TAB_KEY=65289
- CDEFS += -DFT_L_ARR_KEY=65361
- CDEFS += -DFT_R_ARR_KEY=65363
- CDEFS += -DFT_ESC_KEY=65307
-endif
-#--------------------------------------------------------------------------------------------------#
+CDEFS = -D_POSIX_C_SOURCE
+CDEFS += -DFT_SCR_SIZE=\"${SCR_SZE}\"
ifeq (${OS}, Darwin)
- NAME = Cub3D
+ CDEFS += -DFT_OS=1
else
- NAME = a.out
+ CDEFS += -DFT_OS=2
endif
+#--------------------------------------------------------------------------------------------------#
+NAME = Cub3D
#==================================================================================================#
#------------------------------------------ Rules -------------------------------------------------#
#==================================================================================================#
@@ -148,15 +142,12 @@ ifeq (${OS}, Darwin)
endif
ifdef ASAN
@$(MAKE) --no-print-directory -C ${LFT_DIR} all ASAN=1
-endif
-ifdef POWER
- @$(MAKE) --no-print-directory -C ${LFT_DIR} all OPTI=1
else
@$(MAKE) --no-print-directory -C ${LFT_DIR} all
endif
ifeq (${OS}, Darwin)
- ${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm -framework OpenGL \
--framework AppKit
+ ${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -L${MLX_DIR} -lft -lmlx -lm \
+-framework OpenGL -framework AppKit
else
${CC} ${CFLAGS} -o $@ ${OBJS} -L${LFT_DIR} -lft -lX11 -lXext -lmlx -lm -lbsd
endif
@@ -178,7 +169,7 @@ fclean: clean
re: fclean all
#--------------------------------------------------------------------------------------------------#
run: all
- @./${NAME} "map/map_one.cub"
+ @./${NAME} "map/lvl_one.cub"
#--------------------------------------------------------------------------------------------------#
.PHONY: all clean clean fclean re run default
#============================================== EOF ===============================================#