diff --git a/Makefile b/Makefile index 2583fc5..4b1d90c 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ build: - g++ -o file $(file) + g++ $(file) -o $(execute) runb: - g++ -o file $(file) + g++ $(file) -o $(execute) clear - .\file.exe + .\$(execute) clean: rm *.exe \ No newline at end of file diff --git a/makefile_tutorial.md b/makefile_tutorial.md index 4f3dbc2..79ef761 100644 --- a/makefile_tutorial.md +++ b/makefile_tutorial.md @@ -7,15 +7,15 @@ It has 3 commands for automation and can be added to have more if needed. For my ### Build ```bash -make build "filename.cpp" # makes file - dependent on platform may be exe or not +make build file="filename.cpp" execute="executeable_name" ``` -The filename has to be the "" or it will not count it as an argument. +The filename and executeable name has to be the "" or it will not count it as an argument! ### Build and run... and clear ```bash -make runb "filename.cpp" +make runb file="filename.cpp" execute="executeable_name" # .exe if needed ``` -This makes and runs the file assuming it's called file.exe, if not, manually change it in the Makefile. +This makes and runs the file and compiles into what is in the execute flag. ### Clean ```bash