1
0

🏗️」 wip(megaphone): Started megaphone

This commit is contained in:
2024-10-25 16:56:52 +02:00
parent 5e353743d7
commit 5b36260025
5 changed files with 67 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
obj/

46
ex00/Makefile Normal file
View File

@ -0,0 +1,46 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/25 16:09:27 by adjoly #+# #+# #
# Updated: 2024/10/25 16:40:34 by adjoly ### ########.fr #
# #
# **************************************************************************** #
NAME = megaphone
CC = c++
OBJSDIR = obj/
SRCS = megaphone.cpp
OBJS = $(addprefix $(OBJSDIR), $(SRCS:.cpp=.o))
FLAGS = -Wall -Werror -Wextra -std=c++98
all: $(NAME)
$(NAME): $(OBJS)
@printf "\n \x1B[1;33m[  ]\x1B[0m compiling $(NAME)..."
@$(CC) $(FLAGS) $(OBJS) -o $(NAME)
@printf "\x1B[2K\r \x1B[1;33m[  ]\x1B[0m $(NAME) compiled.\n"
$(OBJSDIR)%.o: %.cpp
@mkdir -p $(@D)
@$(CC) $(FLAGS) -c $< -o $@
clean:
@rm -f $(OBJS)
fclean: clean
@rm -f $(NAME)
@rm -Rf $(OBJSDIR)
@printf " \x1B[1;31m[  ]\x1B[0m deleted $(NAME).\n"
re: fclean all
.PHONY: clean fclean all re

View File

BIN
ex00/megaphone Executable file

Binary file not shown.

20
ex00/megaphone.cpp Normal file
View File

@ -0,0 +1,20 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* megaphone.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/25 16:31:50 by adjoly #+# #+# */
/* Updated: 2024/10/25 16:54:55 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include <iostream>
int main(int ac, char **av)
{
(void)av;
if (ac < 2)
std::cout << "* LOUD AND UNBEARABLE FEEDBACK NOISE *" << std::endl;
}