From 317a17d4a3594b454eeb97f12a3ae967bfce16b7 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Wed, 3 May 2023 11:06:39 +0000 Subject: [PATCH] add: map SRCS --- Makefile | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 60850ed..b5e4285 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,22 @@ -SRCS_GAME = main.c game/game.c game/init.c game/manage.c \ +SRCS_GAME := main.c game/game.c game/init.c game/manage.c \ game/manage_keys.c game/raycasting.c -SRCS_PARSING = -OBJS = ${SRCS_GAME:.c=.o} ${SRCS_PARSING:.c=.o} -CC = clang -LIBS = libftx/libftx.a MLX42/build/libmlx42.a -ldl -lglfw -lm -CFLAGS = -g -Wall -Wextra -Werror -NAME = cub3D +SRCS_MAP := parsing.c parsing_header.c parsing_header2.c parsing_meta.c parsing_body.c +SRCS_MAP := $(addprefix map/, $(SRCS_MAP)) + +SRCS := ${SRCS_MAP} \ + ${SRCS_GAME} + +OBJS := ${SRCS:.c=.o} +CC := clang +LIBS := libftx/libftx.a MLX42/build/libmlx42.a -ldl -lglfw -lm +CFLAGS := -g -Wall -Wextra -Werror +NAME := cub3D all: ${NAME} ${NAME}: ${OBJS} make -C libftx all - ${CC} ${CFLAGS} -o ${NAME} ${OBJS} ${LIBS} + ${CC} -o ${NAME} ${OBJS} ${LIBS} clean: make -C libftx clean