Page 1 of 1

Why can't I debug using custom build

Posted: Mon Aug 25, 2008 8:05 am
by annci
I write my makefile and hope to debug using custom build on Codelite. I can compile all files and run this application, but can NOT debug it. If someone know the reason, please tell me. Thank you!

My makefile is as following:

COMMON_HDR = /usr/local/include/
COMMON_LIB = /usr/local/lib/
TARGET_LIB = $(COMMON_LIB)gstreamer-0.10

ASM = nasm
CC = gcc
CFLAGS = -g -mmmx -msse -msse2 -I./
DEBUG_FLAG = -g
RELEASE_FLAG = -march=pentium4 -O3 -pipe -fomit-frame-pointer -W -Wall
#set compile flag
ifeq ($(BUILD),debug)
CFLAGS += $(DEBUG_FLAG)
else
CFLAGS += $(RELEASE_FLAG)
endif

TARGET = libASH264Vid.so
SRC = chroma_interpolate.asm cpuid.asm luma_interpolate.asm get_coeff.asm bdirect.cpp biaridecod.cpp block.cpp cabac.cpp context_ini.cpp convert.cpp convert_intrinsic.cpp cputest.cpp fmo.cpp H264Dec.cpp H264DecInterface.cpp H264VideoDecMgr.cpp header.cpp idct.cpp idct_intrinsic.cpp image.cpp interpolateSSE2_intrinsic.cpp interpolateSSE_intrinsic.cpp intra8x8.cpp loopFilter.cpp loopfilter_intrinsic.cpp loopFilterMBAFF.cpp macroblock.cpp mbuffer.cpp memalloc.cpp nalu.cpp nalucommon.cpp output.cpp parset.cpp parsetcommon.cpp sei.cpp StreamReader.cpp syntax.cpp vlc.cpp mt_pictures.cpp

OBJS = $(patsubst %.cpp,%.o,$(patsubst %.asm,%.o,$(SRC)))
OBJECTS = $(patsubst %.cpp,%.lo,$(patsubst %.asm,%.lo,$(SRC)))

all: $(TARGET)

$(TARGET): $(OBJECTS)
$(CC) -shared -o $(TARGET) $(OBJECTS) -lpthread -lstdc++

%.lo:%.cpp
$(CC) $(CFLAGS) -c -fpic $< -o $@
%.lo:%.asm
$(ASM) -f elf $< -o $@

.PHONY: install

install: $(TARGET)
if test ! -d "/etc/ld.so.conf.d/ASH264Vid.conf"; then \
echo "$(TARGET_LIB)" > /etc/ld.so.conf.d/ASH264Vid.conf; \
fi;
cp $(TARGET) $(COMMON_LIB)$(TARGET)

clean:
rm -rf $(OBJECTS) $(OBJS) $(TARGET) .libs $(COMMON_LIB)libASH264Vid.*

Re: Why can't I debug using custom build

Posted: Mon Aug 25, 2008 8:25 am
by eranif
Hi,

According to your makefile, you are generating a shard object, so what exactly are you running?

Eran