How do I use a make file or compile the source codes for open source software?

Posted on

May,06

 at

3:17 pm

by

admin

I really like using open source software (OSS). However, often times there are no binaries, precompiled installation programs or the executable program itself. Instead the sources, the files that contain the module files or the source codes, are provided with a few files called "make files". How do I use a "make file" or compile the source codes for OSS?

A makefile is not a source file. However, it assists you in compiling the provided source files into binaries. Makefiles allow you just type "make" or "makeall" at the command prompt to compile some code which in the easiest case can be something like:

gcc -o binaryname sourcefile

Instead of typing the above at the command prompt, you can simply include that in the makefile and package it along with the source codes so that other users can simply compile the code without knowing the contents of a makefile.

2 Responses to “How do I use a make file or compile the source codes for open source software?”

  1. if you are using Linux, which you should be, use your package manager, which you should have, to get make
    then all you have to do is ./configure on the source (with appropriate modifiers) then "make install" on it. Otherwise you need a compiler that can compile that type of source.
    References :

  2. A makefile is not a source file. However, it assists you in compiling the provided source files into binaries. Makefiles allow you just type "make" or "makeall" at the command prompt to compile some code which in the easiest case can be something like:

    gcc -o binaryname sourcefile

    Instead of typing the above at the command prompt, you can simply include that in the makefile and package it along with the source codes so that other users can simply compile the code without knowing the contents of a makefile.
    References :
    http://oucsace.cs.ohiou.edu/~bhumphre/makefile.html

Leave a Reply