Skip to content

Commit

Permalink
start of a new pain
Browse files Browse the repository at this point in the history
  • Loading branch information
Anarbb committed Mar 29, 2023
1 parent 0e40245 commit 0f779bd
Show file tree
Hide file tree
Showing 19 changed files with 9,338 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64"
}
],
"version": 4
}
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "enter program name, for example ${workspaceFolder}/a.out",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}

]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.associations": {
"stdlib.h": "c",
"cub3d.h": "c"
}
}
50 changes: 50 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aarbaoui <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/03/28 21:01:46 by aarbaoui #+# #+# #
# Updated: 2023/03/29 12:42:40 by aarbaoui ### ########.fr #
# #
# **************************************************************************** #

NAME := cub3d
CC := cc
CFLAGS := -Iinclude -O2 -Wall -Wextra -Werror
HEADERS := include/cub3d.h
ifeq ($(shell uname), Linux)
LIBFT := libs/linux/libft.a
MLX := libs/linux/libmlx.a
LIBS := -ldl -lglfw -pthread -lm
else
LIBFT := libs/osx/libft.a
MLX := libs/osx/libmlx.a
LIBS :=
endif
SRCS := src/main.c \
src/gnl/get_next_line.c \
src/gnl/get_next_line_utils.c \
src/utils/ft_realloc.c \
src/parsing/parse.c \

OBJS := $(SRCS:.c=.o)

%.o: %.c include/cub3d.h
$(CC) $(CFLAGS) -c $< -o $@

all: $(NAME)

$(NAME): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(MLX) ${LIBFT} -o $(NAME) $(LIBS)

clean:
rm -f $(OBJS)

fclean: clean
rm -f $(NAME)

re: fclean all

.PHONY: all clean fclean re
Loading

0 comments on commit 0f779bd

Please sign in to comment.