I'm very good at programming in C++ but when it gets to linking and the other important stuffs I feel very ignorant. I want to learn allegro without wasting time. So please suggest a book or a resource to learn the concepts mentioned above. Thanks a lot in advance.
I wouldn't spend time on any book. There's really not much knowledge here.
Use Wikipedia, Google, and unix man to
- Understand what make is (file stamp driven dependency aware synthesizer of whatever). Use GNU Make manual as a reference as you go. The important flags of GNU Make to be aware of are '-p', '-n', and '-d'
- Read about gcc/g++ flags for compiling/linking shared/static debug/optimized 32/64-bit modes. Read what LD_LIBRARY_PATH, LD_PRELOAD, position independent code, and rpath are.
- Learn what nm, c++filt, strings, and ldd are. You will need to use them to debug build problems.
This is more or less it.
Understand make, and it will be your best friend.
Make is a kind of dataflow system. In a dataflow system you build the application from components, by connecting their input and output ports, where they send messages (data packets, or sometimes only triggers), so they finally form a processing network. See Wikipedia dataflow programming and flow-based programming articles.
In the case of make, the components are the compilation units, the messages are changes of files (source, object, other resource). When a file changes, it triggers a component (a compiling node), then the component, after doing its task, producing outputs, and triggering other components, which are doing same way, until the message chain reaches the final (sink) component, which produces a.out.
Opposite to other dataflow architectures, make does not run continuously. you have to launch it, when you feel that a file has changed, and it will trigger a component. If you run make when there's no changed files, so no component will be triggered, it says a "nothing to do" message and stops.
If there're parallel paths in the dataflow net, make can run components parallel, try
make -j option. (It's an interesting effect that the G++ itself does not utilize multiple processors, but it does with the help of make.)
Making a good makefile is not trivial, but if you think of make as a dataflow application builder, it can be a very effective tool.
You don't have to learn
autoconf and make files and all that stuff in order to get started under Linux. You can still use an IDE such as Eclipse, which will generate all the autoconf stuff for you automatically.
Eventually, you probably will want to learn it, but you don't have to if you're just starting out. Eclipse will be able to 90% of the stuff you need via it's GUI and wizards, etc.
For example, this page explains how to get started with Allegro under Eclipse. That page does appear to make some assumptions about your knowledge of Linux, but I'm sure with a bit of googling you should be able to find some more thorough references (that was just the first page I found).
Linkers and Loaders by Levine was very good. We use this textbook at OSU in our Assembler, Linker, Loader, Compiler Design course.
I want to learn allegro without wasting time.
if you want to develop a game without wasting time, start with a complete game engine like Quake
[yes, i've used Allegro.]