J
Joseph
Hi gurus,
Can someone quickly remind me how I can add a -g (to generate the
debug table inside the core file) so I can run it against GDB and find
out whats happening. I tried to put it in the right after the $(CC)
as in $(CC) -g .... But it didn't work. The core file shows no
stack in GDB
By the way, I am compiling on a Linux box. This is a makefile from a
piece of code that i need to maintain. TIA
========================== THE MAKEFILE FOLLOWS ====================
I=$(CUST)/src/include
MAKEINCDIR=$(I)/Makefiles
DIRNAME=SendFtir
CATALOG=SendFtir_text.t
CDEBUGFLAGS=-g
include $(MAKEINCDIR)/$(shell uname)/vets.variables
include $(MAKEINCDIR)/$(shell uname)/ANSI.compiler
include $(MAKEINCDIR)/vets.rules
include $(MAKEINCDIR)/NLS.rules
all: catalogs progs
LIBS=\
$(LIB)/libvets.a \
$(LIB)/libphrases.a \
$(LIB)/libftir.a \
$(LIB)/libio.a \
$(LIB)/libinifile.a \
$(LIB)/libstr.a \
$(LIB)/libXXX.a
SYSLIB= $(SYSNLSLIB)
# --------------------------------------------------------------------
# CATALOGS
#
include $(MAKEINCDIR)/catalogs.progs
# --------------------------------------------------------------------
# PROGS
#
..PHONY progs: SendFtir
SENDFTIR=\
$(OBJDIR)GetData.o \
$(OBJDIR)PrintData.o \
$(OBJDIR)SendFtir.o
SendFtir: $(BIN)/SendFtir6k
$(BIN)/SendFtir6k: $(SENDFTIR) $(LIBS)
$(CC) $(LDFLAGS) -o $(@F) $(SENDFTIR) $(LIBS) $(SYSLIB)
$(INSTALL)
$(CLEANUP)
# --------------------------------------------------------------------
include $(MAKEINCDIR)/clean.rules
#
# Include file dependencies
#
include $(addprefix depends/,$(SENDFTIR:.o=.d))
include $(addprefix depends/,$(CATALOG:.t=.d))
Can someone quickly remind me how I can add a -g (to generate the
debug table inside the core file) so I can run it against GDB and find
out whats happening. I tried to put it in the right after the $(CC)
as in $(CC) -g .... But it didn't work. The core file shows no
stack in GDB
By the way, I am compiling on a Linux box. This is a makefile from a
piece of code that i need to maintain. TIA
========================== THE MAKEFILE FOLLOWS ====================
I=$(CUST)/src/include
MAKEINCDIR=$(I)/Makefiles
DIRNAME=SendFtir
CATALOG=SendFtir_text.t
CDEBUGFLAGS=-g
include $(MAKEINCDIR)/$(shell uname)/vets.variables
include $(MAKEINCDIR)/$(shell uname)/ANSI.compiler
include $(MAKEINCDIR)/vets.rules
include $(MAKEINCDIR)/NLS.rules
all: catalogs progs
LIBS=\
$(LIB)/libvets.a \
$(LIB)/libphrases.a \
$(LIB)/libftir.a \
$(LIB)/libio.a \
$(LIB)/libinifile.a \
$(LIB)/libstr.a \
$(LIB)/libXXX.a
SYSLIB= $(SYSNLSLIB)
# --------------------------------------------------------------------
# CATALOGS
#
include $(MAKEINCDIR)/catalogs.progs
# --------------------------------------------------------------------
# PROGS
#
..PHONY progs: SendFtir
SENDFTIR=\
$(OBJDIR)GetData.o \
$(OBJDIR)PrintData.o \
$(OBJDIR)SendFtir.o
SendFtir: $(BIN)/SendFtir6k
$(BIN)/SendFtir6k: $(SENDFTIR) $(LIBS)
$(CC) $(LDFLAGS) -o $(@F) $(SENDFTIR) $(LIBS) $(SYSLIB)
$(INSTALL)
$(CLEANUP)
# --------------------------------------------------------------------
include $(MAKEINCDIR)/clean.rules
#
# Include file dependencies
#
include $(addprefix depends/,$(SENDFTIR:.o=.d))
include $(addprefix depends/,$(CATALOG:.t=.d))