我正在尝试构建pjsip项目.. 这是我的pjsip项目制作文件..
include ../../../build.mak
include ../../../build/common.mak
export LIBDIR := ../../lib
RULES_MAK := $(PJDIR)/build/rules.mak
#export MYCOMPRESS_LIB := ../../lib/lmycompresslib-$(TARGET_NAME)$(LIBEXT)
export MYCOMPRESS_LIB := lmycompresslib-$(TARGET_NAME)$(LIBEXT)
ifeq ($(PJ_SHARED_LIBRARIES),)
else
export MYCOMPRESS_SONAME := lmycompresslib.$(SHLIB_SUFFIX)
export MYCOMPRESS_SHLIB := $(MYCOMPRESS_SONAME).$(PJ_VERSION_MAJOR)
endif
###############################################################################
# Gather all flags.
#
export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
$(CFLAGS) $(CC_INC). $(CC_INC)../../mycompresslib/include \
$(CC_INC)../../../pjlib/include
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
$(HOST_CXXFLAGS) $(CXXFLAGS)
export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
$(LDFLAGS)
export MYCOMPRESS_SRCDIR = ../../mycompresslib/src
export MYCOMPRESS_OBJS = mycompress.o
export MYCOMPRESS_CFLAGS = $(_CFLAGS)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
###############################################################################
# Main entry
#
# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
#
#TARGETS := lmycompresslib
TARGETS := $(MYCOMPRESS_LIB) $(MYCOMPRESS_SONAME)
all: $(TARGETS)
doc:
cd .. && doxygen docs/doxygen.cfg
dep: depend
distclean: realclean
#.PHONY: dep depend lmycompresslib clean realclean distclean
.PHONY: all dep depend clean realclean distclean
.PHONY: $(TARGETS)
.PHONY: $(MYCOMPRESS_LIB) $(MYCOMPRESS_SONAME)
#lmycompresslib:
# $(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $(MYCOMPRESS_LIB)
lmycompresslib: $(MYCOMPRESS_LIB)
$(MYCOMPRESS_SONAME): $(MYCOMPRESS_LIB)
$(MYCOMPRESS_LIB) $(MYCOMPRESS_SONAME):
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $(subst /,$(HOST_PSEP),$(LIBDIR)/$@)
clean print_lib:
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $@
realclean:
$(subst @@,$(subst /,$(HOST_PSEP),.lmycompresslib-$(TARGET_NAME).depend),$(HOST_RMR))
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $@
depend:
$(MAKE) -f $(RULES_MAK) APP=MYCOMPRESS app=lmycompresslib $@
这是我得到的错误..
.depend:1:***缺少分隔符。停止。
我使用此命令验证我的makefile中是否只有使用此命令的选项卡
cat -e -t -v makefile
但是当我尝试构建这个项目时,我仍然遇到上述错误。
答案 0 :(得分:2)
找到解决方案。这是因为损坏的依赖文件,可能是因为make dep停止或突然停止。它实际上是在网站本身给出的。我需要做的就是发出这个命令。
make distclean
这也导致了错误。如网站上提到的,它指示我删除所有损坏的依赖文件。继续另一个pjsip邮件链接
$ find . -name "*.depend" -print | xargs rm -f
发出此命令后,它删除了所有已损坏的依赖项,然后我才能成功编译和构建项目。