Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

makefile extension

Tags:

makefile

I wanted to create a makefile. So I wrote instructions in a notepad file.
But what extension should I give while saving this file?

like image 651
Happy Mittal Avatar asked May 03 '10 05:05

Happy Mittal


People also ask

Is makefile a text file?

The makefile is a text file that contains the recipe for building your program. It usually resides in the same directory as the sources, and it is usually called Makefile . Each one of these commands should be a separate rule in a makefile.

How do I open a makefile file?

If you cannot open your MAKEFILE file correctly, try to right-click or long-press the file. Then click "Open with" and choose an application. You can also display a MAKEFILE file directly in the browser: Just drag the file onto this browser window and drop it.

What is a makefile for C++?

C++ Makefile. A makefile is nothing but a text file that is used or referenced by the 'make' command to build the targets. A makefile also contains information like source-level dependencies for each file as well as the build-order dependencies.

How do I run a makefile in Visual Studio?

From the Visual Studio start page, type "makefile" in the New Project search box. Or, in the New Project dialog box, expand Visual C++ > General (Visual Studio 2015) or Other (Visual Studio 2017) and then select Makefile Project in the Templates pane to open the project wizard.


2 Answers

If you run:

make 

this program will look for a file named makefile in your directory, and then execute it. If you have several makefiles, then you can execute them with the command:

make -f MyMakefile 
like image 73
berkay Avatar answered Oct 18 '22 04:10

berkay


By default, The GNU Make tries some particular names, no using any extension. You can specify file with any name to it. But if you want syntax highlighting in some editors, you can use an extension.

There is a wildcard rule for recognizing make files in Geany editor:

Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*; 
like image 20
Кое Кто Avatar answered Oct 18 '22 04:10

Кое Кто