![]() Since makefile contains only one target “helloworld”, you can also call make command without any argument as shown above.”make”. Create a makefile as shown below.Įxecute make to create the helloworld executable as shown below. While you don’t need to use make for compiling single a program, the following example will give you an idea on how to use make. Using cc command, typically you would compile it as shown below. Let us assume that you have the sample C program file called helloworld.c. Create the Makefile for a Simple Compilation In this article, let us review how to use make command.ġ. For compiling multiple C programs, Make utility is very helpful.Īlso, C programmers and sysadmins will find it helpful to automate the compilation related tasks using make utility. ![]() But, why make? What does it really do?įor compiling a single C program, cc command is very helpful. Have you wondered what all these make commands are really making? Sure, we know that it is trying to compile and install the software. When you install any software from source, you typically execute commands like - “make”, “make install”, “make clean”, etc. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |