Skip to content

Commit

Permalink
init again
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Thomas authored and Benjamin Thomas committed Jun 25, 2024
1 parent 4a592a3 commit 78baa30
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
32 changes: 30 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,35 @@
NAME = minishell
CC = cc
CFLAGS = -Wall -Werror -Wextra -g3
CFLAGS = -Wall -Werror -Wextra -pthread -g3

SRCDIR = src
CFILES = parse.c
OBJDIR = obj
CFILES = main.c \
parse.c
SRC = $(addprefix $(SRCDIR)/, $(CFILES))
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:.c=.o))
INCS = -I./include

all: $(OBJDIR) $(NAME)
@echo "Making minishell..."

$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) $(INCS) -c $< -o $@

$(OBJDIR):
mkdir -p $(OBJDIR)

$(NAME): $(OBJS)
$(CC) $(CFLAGS) $(INCS) -o $(NAME) $(OBJS)

clean:
@echo "Cleaning object files..."
@rm -rf $(OBJDIR)

fclean: clean
@echo "Removing minishell..."
rm -f $(NAME)

re: fclean all

.PHONY: all clean fclean re
2 changes: 2 additions & 0 deletions include/minishell.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@
# include <string.h>
# include <sys/ioctl.h>
# include <termios.h>
# include <curses.h>
# include <term.h>

#endif
20 changes: 20 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bthomas <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/25 13:43:42 by bthomas #+# #+# */
/* Updated: 2024/06/25 13:44:08 by bthomas ### ########.fr */
/* */
/* ************************************************************************** */

#include "minishell.h"

int main(int ac, char **av)
{
(void)ac;
(void)av;
return (0);
}

0 comments on commit 78baa30

Please sign in to comment.