summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ex02/Makefile40
-rw-r--r--ex02/main.cpp14
2 files changed, 54 insertions, 0 deletions
diff --git a/ex02/Makefile b/ex02/Makefile
new file mode 100644
index 0000000..7ac33bd
--- /dev/null
+++ b/ex02/Makefile
@@ -0,0 +1,40 @@
+################################################################################
+################################## VARIABLES ###################################
+################################################################################
+
+NAME := hi_this_is_brain
+
+CC = c++
+CFLAGS = -Wall -Wextra -Werror -std=c++17
+
+SRC := main.cpp
+
+
+################################################################################
+#################################### RULES #####################################
+################################################################################
+
+all: $(NAME)
+
+$(NAME):
+ @$(CC) $(CFLAGS) $(SRC) -o $@
+ @echo "[$(NAME)] Created binary."
+
+clean:
+ @if [ -f "$(NAME)" ]; then \
+ rm -f $(NAME); \
+ echo "[$(NAME)] Removed binary."; \
+ fi
+
+fclean: clean
+ @if [ -f "$(NAME)" ]; then \
+ rm -f $(NAME); \
+ echo "[$(NAME)] Removed binary."; \
+ fi
+
+re: fclean all
+
+.PHONY: all clean fclean re
+
+################################################################################
+################################################################################
diff --git a/ex02/main.cpp b/ex02/main.cpp
new file mode 100644
index 0000000..188eb5b
--- /dev/null
+++ b/ex02/main.cpp
@@ -0,0 +1,14 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* main.cpp :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2025/02/10 11:37:18 by dkaiser #+# #+# */
+/* Updated: 2025/02/10 11:37:44 by dkaiser ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+int main(void)
+{}