Thursday, January 7, 2010

Generic Makefile

Here is a Generic Makefile to compile xxx.c++ to xxx executable:
    0 CC = g++
1 CFLAG = -Wall -g -ansi
2
3 %: %.c++
4 $(CC) $(CFLAG) -o $@ $^
5
It will be very useful for all our sample codes.
For example:
hello.c++:
    0 #include <iostream>
1
2 using namespace std;
3
4 int main() {
5 cout<<"hello world"<<endl;
6 return 0;
7 }
$ make hello
g++ -Wall -g -ansi -o hello hello.c++
$ ./hello
hello world
$

Welcome to Programmer's Quest

Why did I create Prog Heaven ? What can you find in this blog ?

I started this blog as part of my New Year Resolution to start a Blog for Start-up Programmers. I'm going to post a variety of Programming Blog-posts which include:

* C Programming
* Unix/Linux System Programming
* Unix/Linux Network Programming
* C++ Programming
* Object Oriented Analysis & Design
* Unified Modeling Language - UML
* Functional Programming (Scheme, LISP, Haskel)
* Logic Programming (Prolog)
* Programming Problem Solving
* Algorithms & Data Structures
* Software Engineering (mostly Construction)
* and Other Programming Related Articles ...

I will also try to answer any question & comments related to programming. Enjoy the ride with me.