the source releases will have the source code to be compiled as opposed to a pre-compiled tar package
(do I have that right? drag? still learning Linux myself)
Anything that says it's source or source code along those lines will contain the actual C language (or otherwise) used to create the program.
In most source releases it will contain a directory were the source code is kept, a Make file and some other scripts and settings and stuff like configure script and some other assorted files.
The MAKE file contains the directions needed to compile programs, there are some tools other then the gcc compiler itself that help out, like the "make" command.
Generally in order to compile programs you do this command while in the home directory:
./configure
This will scan your system and look for dependances. It may need to have the GTK+ library present for instance and will look for it. Also it looks for different setting and dependances for different features. For instance if your compiling a application for playing music, it make look for alsa support or check for OSS support, or maybe the GUI part of the program can be compiled using QT or GTK+ or GTK+ 2.0.
Most programs are compiled using libraries. Libraries are common code used in many programs. I linux they are generally located in lib directories, and in windows they are *.dll files.
So if you have the libraries needed for ALSA it may compile using ALSA, if you lack the libraries for ALSA it may not end up supporting some features, or it may fail and complain. It all depends on the program.
The configure script checks for all this and sets up the MAKE file which governs what is actually going to be compiled.
Very simple programs will often lack a configure script, and just have a make file. Sometimes you even have to manually edit the make file to configure it manually for your system, but this is rare.
Then you run the make command like such:
make
That looks for the MAKE file and then it knows what to do to set up and compile the binary versions of the program and any new libraries that is created along with the program.
Then you do a:
make install
And that goes to the make file and finds out what files to copy were to install your program. Usually you have to be root.
Sometimes you have "make test" which will run some tests to check out and make sure that everything is working before you install the program.
So the generic thing to do is:
./configure
make
make install
And that will install the program from source code.
But there are lots of variations and there are NO rules on howto do that. Most authors will include a INSTALL and/or Readme file. Always read those to find out exactly what to do. Sometimes their are extra steps you have to do, or even something completely different.
For instance I installed a simple program called ratmen a while ago for my laptop. I untarred the source and just ran "make", then simply copied the resulting binary to my ~/bin directory.
If you want to look at the source code you generally look for *.c files for C programs.
The simplist way to compile C programs is to just use the gcc.
#include <stdio.h>
main()
{
printf ("Hello Anandtech!\n");
}
Put that in a file called test.c then do this:
gcc test.c
then it will create a file named a.out, run this command:
./a.out
That "#include <stdio.h>" is pulling code from the standard c libraries and is what enables me to use the printf command in this simple program.
BTW. If you want to learn the basics of programming check out
Python. It's a nice interpreted langauge (you don't have to compile it to use it) and has all the features and capabilities of any modern langauge.
It's kinda of like qbasic equivilant for linux, except that it doesn't suck and you NEVER USE GOTO's if you can help it.
It's used from scripting websites to making GUI applications. Mostly it makes a good mathmatical programming langauge for doing large calculations quickly (C and even java are faster then python, but not when you include the time to write the program in the first place.).
One famous thing is that it is used to create the portage system for Gentoo.