diff --git a/Makefile b/Makefile index d0dda2c..3048751 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,21 @@ -main: main.cpp - gcc main.cpp +# Compiler +CXX = g++ + +# Compiler flags +CXXFLAGS = -std=c++11 -Wall + +# Source file +SRC = main.cpp + +# Executable name +TARGET = main + +# Default target +all: $(TARGET) + +$(TARGET): $(SRC) + $(CXX) $(CXXFLAGS) -o $@ $< + +# Clean +clean: + rm -f $(TARGET)