automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compile with "-g" switch?


From: juman
Subject: Compile with "-g" switch?
Date: Thu, 31 Jul 2003 00:11:35 +0200
User-agent: Mutt/1.4i

I'm quite new to the autotools but working with a small project. I want
to be able to choose that the compilation should compile all files with
the "-g" so I can use gdb on the compiled software...

My files so far is looking like this:

configure.in
-----
AC_INIT(musidab, [0.1])

AM_INIT_AUTOMAKE(musidab, 0.1)

AM_CONFIG_HEADER(src/config.h)

AC_PROG_CC

AC_CHECK_LIB(ncurses, main,, AC_CHECK_LIB(curses, main,,
AC_MSG_ERROR(The ncurse
s terminal library is required in order to build the program)))

AC_CHECK_SIZEOF(short int,1)
AC_CHECK_SIZEOF(int,1)
AC_CHECK_SIZEOF(long int,1)
AC_CHECK_SIZEOF(char,1)

AC_OUTPUT(Makefile src/Makefile)
-----

Makefile.am
-----
SUBDIRS = src
-----

src/Makefile.am
-----
bin_PROGRAMS = musidab
musidab_SOURCES = musidab.c
----

Now when compiling it looks like this:

make[2]: Entering directory `/root/mp3/musidab/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -MT musidab.o -MD -MP -MF 
".deps/musidab.Tpo" \
  -c -o musidab.o `test -f 'musidab.c' || echo './'`musidab.c; \
then mv ".deps/musidab.Tpo" ".deps/musidab.Po"; \
else rm -f ".deps/musidab.Tpo"; exit 1; \
fi
gcc  -g -O2   -o musidab  musidab.o  -lncurses

Any tips of how I easiest disable the compilation from using the -O2 flag 
temporary?

Regards,

Juman
Sweden

  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]