This Makefile Extension for Visual Studio Code simplifies the process of creating and managing Makefiles for C++ projects. It allows you to generate a Makefile for a specified C++ file, and provides options for handling existing Makefiles.
-
Automatic Makefile Generation: Quickly generate a Makefile for a specified C++ file within your project.
-
Makefile Management:
- If a Makefile already exists in the project directory, the extension prompts the user to choose between running the current Makefile or creating a new one.
- If the user chooses to create a new Makefile, they are prompted to specify a function name and the file to link.
- Visual Studio Code installed.
- C/C++ extension for Visual Studio Code installed.
-
Clone or download this repository to your local machine.
-
Open Visual Studio Code and navigate to the Extensions view (
Ctrl+Shift+X). -
Click on the "..." icon and select "Install from VSIX...".
-
Choose the downloaded VSIX file from the cloned/downloaded repository.
-
Reload Visual Studio Code to activate the extension.
-
Open a C++ file in Visual Studio Code.
-
Access the editor Run button, open its menu and select "Compile/Run Makefile"
-
Follow the prompts:
- If a Makefile exists:
- Choose to run the current Makefile or create a new one.
- If creating a new Makefile, specify a function name and the file to link in command pallete.
- If a Makefile exists:
-
The extension will generate the Makefile for you in the project directory.
- Makefile Extension: Create Makefile: Trigger the process of creating a Makefile for the specified C++ file.
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
- Split the editor (
Cmd+\on macOS orCtrl+\on Windows and Linux). - Toggle preview (
Shift+Cmd+Von macOS orShift+Ctrl+Von Windows and Linux). - Press
Ctrl+Space(Windows, Linux, macOS) to see a list of Markdown snippets.
Enjoy!
