diff --git a/Makefile b/Makefile index c6c2120..e94768d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ NAME = cub3D -CC = cc +CC = gcc OBJSDIR = obj/ @@ -12,9 +12,7 @@ LIBFT_DIR = libft/ INCLUDE = -I $(I_DIR) -I $(LIBFT_DIR)/$(I_DIR) -SRCS = src/main.c \ - src/parsing/check_arg.c \ - src/utils/mess_error.c +SRCS = $(shell find src -name '*.c') OBJS = $(addprefix $(OBJSDIR), $(SRCS:.c=.o)) @@ -22,7 +20,7 @@ FLAGS = -Wall -Werror -Wextra LIB = libft/libft.a $(NAME): $(OBJS) - @make -s -C libft + @make -sj $(nproc) -C libft @$(CC) $(FLAGS) $(OBJS) $(LIB) -o $(NAME) @echo "✅ Compiled" diff --git a/cub3D b/cub3D new file mode 100755 index 0000000..dd839b8 Binary files /dev/null and b/cub3D differ diff --git a/include/cub3d.h b/includes/cub3d.h similarity index 100% rename from include/cub3d.h rename to includes/cub3d.h diff --git a/include/mess_err.h b/includes/mess_err.h similarity index 100% rename from include/mess_err.h rename to includes/mess_err.h diff --git a/src/main.c b/src/cub3d.c similarity index 88% rename from src/main.c rename to src/cub3d.c index 816e15b..6c11405 100644 --- a/src/main.c +++ b/src/cub3d.c @@ -1,16 +1,16 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* main.c :+: :+: :+: */ +/* cub3d.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: madumerg +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/04 16:58:27 by madumerg #+# #+# */ -/* Updated: 2024/09/07 19:12:04 by madumerg ### ########.fr */ +/* Updated: 2024/09/11 11:10:39 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ -#include "../include/cub3d.h" +#include "cub3d.h" char **ft_parse_map(char *map) { diff --git a/src/parsing/check_arg.c b/src/parsing/check_arg.c index f17f593..fcd69c3 100644 --- a/src/parsing/check_arg.c +++ b/src/parsing/check_arg.c @@ -6,11 +6,11 @@ /* By: madumerg +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/04 21:33:35 by madumerg #+# #+# */ -/* Updated: 2024/09/07 17:57:29 by madumerg ### ########.fr */ +/* Updated: 2024/09/11 11:11:05 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ -#include "../../include/cub3d.h" +#include "cub3d.h" int check_err_arg(int ac, char **av) { diff --git a/src/utils/mess_error.c b/src/utils/mess_error.c index 41446eb..c199dc9 100644 --- a/src/utils/mess_error.c +++ b/src/utils/mess_error.c @@ -6,11 +6,11 @@ /* By: madumerg +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/07 17:35:14 by madumerg #+# #+# */ -/* Updated: 2024/09/07 17:40:57 by madumerg ### ########.fr */ +/* Updated: 2024/09/11 11:10:48 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ -#include "../../include/cub3d.h" +#include "cub3d.h" int err_mess(char *str) {