Why can't I debug using custom build

General questions regarding the usage of CodeLite
annci
CodeLite Curious
Posts: 2
Joined: Mon Aug 25, 2008 7:52 am
Contact:

Why can't I debug using custom build

Post 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.*
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Why can't I debug using custom build

Post by eranif »

Hi,

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

Eran
Make sure you have read the HOW TO POST thread
Post Reply