-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Benjamin Thomas
authored and
Benjamin Thomas
committed
Jun 25, 2024
1 parent
4a592a3
commit 78baa30
Showing
3 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |