Am I missing something obvious or is there no option to make debug on *nix?

Here is what I am doing:

./configure --prefix=/home/ramey/freeglut-2.4.0/install-dir/ (change as needed... you CAN'T use relative paths)
Then edit the Makefile is the freeglut root directory:
<libdir = ${exec_prefix}/lib
>ifeq ($(debug),1)
>libdir = ${exec_prefix}/dbg-lib
>else
>libdir = ${exec_prefix}/lib
>endif

Edit the Makefile in src:
<libdir = ${exec_prefix}/lib
>ifeq ($(debug),1)
>libdir = ${exec_prefix}/dbg-lib
>else
>libdir = ${exec_prefix}/lib
>endif
<CFLAGS = -g -O2 -Wall -pedantic -Werror
>CFLAGS = -Wall -pedantic -Werror
>ifeq ($(debug),1)
>CFLAGS += -g
>else
>CFLAGS += -O2
>endif

make install
make clean
make debug=1 install


It would be really nice if I didn't have to hack the Makefile after configure. However, I don't speak configure at all so I have no idea how to hack the configure file up to fix this.

Larry E. Ramey


Stay in the know. Pulse on the new Yahoo.com. Check it out.