-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am currently working my way through a dozen or so exercises to get in
touch with the language features of C++. On the second exercise, I
needed to parse command line options, so I opted to use the Boost
library. Unfortunantely, linking them up is somewhat complicated, so I
decided to learn how to write Makefiles.

So, here is a fairly simple Makefile that works. I would like to know if
I did anything wrong, went against any good practice, i.e. did anything
that could become a bad habit. How portable is this Makefile? Thanks!

error_mode = -ansi -pedantic
cc = g++ $(error_mode)
boost = /usr/include/boost-1_33_1
boost_program_options = boost_program_options-gcc-mt-s
programs = fibonacci.exe printNumbers.exe

all : fibonacci printNumbers

objects/fibonacci.o :
        $(cc) -c -I $(boost) -o objects/fibonacci.o fibonacci.cpp

fibonacci : objects/fibonacci.o
        $(cc) -o fibonacci.exe objects/fibonacci.o -l $(boost_program_options)

printNumbers :
        $(cc) -o printNumbers.exe printNumbers.cpp

clean :
        rm $(programs) objects/*

- --
 Edward Z. Yang      Personal: [EMAIL PROTECTED]
 SN:Ambush Commander Website: http://www.thewritingpot.com/
 GPGKey:0x869C48DA   http://www.thewritingpot.com/gpgpubkey.asc
 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFfhIVqTO+fYacSNoRAreBAJsG81BAunuuO/nEWD2yLTw64/q6XACcCObW
J6/KwDHLWWNq/TPobb6Z+Hs=
=r9hV
-----END PGP SIGNATURE-----


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to