Skip to content

Commit

Permalink
libft as submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugothms committed Mar 13, 2022
1 parent 9971e00 commit a12bb3c
Show file tree
Hide file tree
Showing 136 changed files with 2,481 additions and 941 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "libft"]
path = libft
url = [email protected]:Hugothms/libft.git
18 changes: 5 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# By: hthomas <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/05/04 09:45:09 by hthomas #+# #+# #
# Updated: 2021/04/23 17:10:43 by hthomas ### ########.fr #
# Updated: 2022/03/13 19:08:10 by hthomas ### ########.fr #
# #
# **************************************************************************** #

Expand All @@ -21,7 +21,6 @@ NAME = cub3D
--COMMONS = srcs/check_map.c \
srcs/color.c \
srcs/error.c \
srcs/get_next_line.c \
srcs/move.c \
srcs/move2.c \
srcs/parse_map.c \
Expand Down Expand Up @@ -59,11 +58,8 @@ NAME = cub3D

--LIBFT = libft.a
--LIBFTDIR = libft
--LIBFTLINK = -L $(--LIBFTDIR) -lft

--FTPRINTF = libftprintf.a
--FTPRINTFDIR = ft_printf
--FTPRINTFLINK = -L $(--FTPRINTFDIR) -lftprintf
--LIBFTINCL = includes/
--LIBFTLINK = -L $(--LIBFTDIR)/$(LIBFTINCL) -lft

--UNAME_S := $(shell uname -s)
ifeq ($(--UNAME_S), Linux)
Expand All @@ -85,8 +81,8 @@ all : $(--LIBFTDIR)/$(--LIBFT) $(--LIBMLXDIR)/$(--LIBMLX) $(NAME)
$(NAME) : $(--OBJS) $(--HEADER) $(--LIBFTDIR)/$(--LIBFT) $(--LIBMLXDIR)/$(--LIBMLX)
$(--CC) $(--OPTI) $(--LDFLAGS) -o $@ $(--OBJS) $(--LIBFTLINK) $(--LIBMLXLINK) $(--MLX_INCLUDE) $(ENV)

bonus : $(--OBJS_BONUS) $(--HEADER) $(--FTPRINTFDIR)/$(--FTPRINTF) $(--LIBMLXDIR)/$(--LIBMLX)
$(--CC) $(--OPTI) $(--LDFLAGS) -o $(NAME) $(--OBJS_BONUS) $(--FTPRINTFLINK) $(--LIBMLXLINK) $(--MLX_INCLUDE) $(ENV)
bonus : $(--OBJS_BONUS) $(--HEADER) $(--LIBFTDIR)/$(--LIBFT) $(--LIBMLXDIR)/$(--LIBMLX)
$(--CC) $(--OPTI) $(--LDFLAGS) -o $(NAME) $(--OBJS_BONUS) $(--LIBFTLINK) $(--LIBMLXLINK) $(--MLX_INCLUDE) $(ENV)

###########################LIBS
$(--LIBFTDIR)/$(--LIBFT) :
Expand All @@ -95,9 +91,6 @@ $(--LIBFTDIR)/$(--LIBFT) :
$(--LIBMLXDIR)/$(--LIBMLX) :
$(--MAKE) -C $(--LIBMLXDIR) all

$(--FTPRINTFDIR)/$(--FTPRINTF) :
$(--MAKE) -C $(--FTPRINTFDIR) all

%.o: %.c $(--HEADER)
$(--CC) -c $(--LDFLAGS) -I $(--INCL) -o $@ $<

Expand All @@ -111,7 +104,6 @@ clean:
fclean: clean
#echo "$(RED_FG)Deleting exe$(CLEAR_COLOR)"
cd $(--LIBFTDIR) && $(--MAKE) fclean
cd $(--FTPRINTFDIR) && $(--MAKE) fclean
cd $(--LIBMLXDIR) && $(--MAKE) clean
rm -f $(NAME) a.out bonus

Expand Down
135 changes: 0 additions & 135 deletions ft_printf/Makefile

This file was deleted.

8 changes: 4 additions & 4 deletions includes/cub3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: hthomas <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/04 09:33:37 by hthomas #+# #+# */
/* Updated: 2021/04/09 17:06:10 by hthomas ### ########.fr */
/* Updated: 2022/03/13 18:58:43 by hthomas ### ########.fr */
/* */
/* ************************************************************************** */

Expand All @@ -19,9 +19,9 @@
# include <math.h>
# include <errno.h>
# include <unistd.h>
# include "../libft/libft.h"
# include "../ft_printf/includes/ft_printf.h"
# include "get_next_line.h"
# include "../libft/includes/libft.h"
# include "../libft/includes/ft_printf.h"
# include "../libft/includes/get_next_line.h"
// # ifdef LINUX
# include "mlxlinux.h"
// # else
Expand Down
44 changes: 0 additions & 44 deletions includes/get_next_line.h

This file was deleted.

36 changes: 36 additions & 0 deletions libft/.github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This is a basic workflow to help you get started with Actions

name: 42 Norminette V2

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs alexandregv's github action
- name: 42 Norminette
# You may pin to the exact commit or the version.
# uses: alexandregv/norminette-action@ba2b115ba6846c6ea5f2e060103df47944292519
uses: alexandregv/norminette-action@v2
with:
# Flags passed to norminette
flags: . # default is .

58 changes: 58 additions & 0 deletions libft/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

#Perso
checker
push_swap
.vscode/*
.DS_Store
Loading

0 comments on commit a12bb3c

Please sign in to comment.