make文件中的错误:***缺少分隔符停止

【字号: 日期:2024-03-28浏览:25作者:雯心
(adsbygoogle = window.adsbygoogle || []).push({}); 如何解决make文件中的错误:***缺少分隔符停止?

您可以在Make产生的附录B错误中找到此错误的说明。

配方中的每一行必须以制表符开头。从文件顶部开始$(C++)和$(CC)附近的配方似乎都不以制表符开头。

此外,本节

INCLUDE = -I./usr/include/sys -I./Headers

在sys同一节(以及更多节)具有多余的空行之后,似乎缺少了一个反斜杠。

解决方法

我在CentOS 6.0264位中的make文件中遇到错误。我需要知道应该怎么做才能使makefile可行。任何建议将大有帮助。我的make文件粘贴在下面:-

#.SUFFIXES: .cc $(.SUFFIXES)ALL = libpal.a#all = $(ALL)all: $(ALL).cpp.o: $(C++) -o $@ -c $(PROF) $(CFLAGS) $*.cpp.cc.o: $(C++) -o $@ -c $(PROF) $(CFLAGS) $*.cc.c.o: $(CC) -o $@ -c $(PROF) $(CFLAGS) $*.ctop_srcdir = ..OPENSSL_LIB_DIR = ../../ThirdPartyLibs/openssl-0.9.8e/includeBOOST_DIR = ../../ThirdPartyLibs/boost/stage/libBOOST_INCLUDE_DIR = ../../ThirdPartyLibs/boostCC = gccC++ = g++CCOPT = -Os -Wall -Wno-deprecatedCCOPT_DEBUG = -Wall -g -Wno-deprecatedPROF =STATIC = -staticINCLUDE = -I./usr/include/sys -I./Headers -I$(top_srcdir)/PAL/Headers -I$(top_srcdir)/BaseMulti/Headers -I$(top_srcdir)/NetworkMulti/Headers -I$(top_srcdir)/RTP/Headers -I$(BOOST_INCLUDE_DIR) -I$(OPENSSL_LIB_DIR) LIBDIRS = -L$(BOOST_DIR) #XXX NLAYER define / MB_DEBUGDEFINE = -D_LINUX -DDEBUGLOG -D_INDENT_DB_PRINT -fsigned-char -fno-inline -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PER_PROCESS_TIMER_SOURCE -D_PTHREADS -DUNICODE #-DDISABLE_LOGSHLIB_SUFFIX = .soSHLIB_LD = gcc -sharedSHLIB_LD_LIBS =SHLIB_CFLAGS = -fPICBFLAGS = $(DEFINE) $(INCLUDE)CFLAGS = $(CCOPT) $(BFLAGS)OBJ_C =OBJ_CC = ./Sources/PALsystime.o ./Sources/PALdebug.o ./Sources/PALdebuglog.o ./Sources/PALthread.o ./Sources/PALcritsec.o ./Sources/PALprofiler.o ./Sources/PALserializable.o ./Sources/PALinet.o ./Sources/PALnetwork.o ./Sources/PALsocket.o ./Sources/PALlocalhostUdpEvent.o ./Sources/PALpollarray.o ./Sources/PALrandom.o OBJS = $(OBJ_C) $(OBJ_CC)SRCS = $(OBJ_C:.o=.c) $(OBJ_CC:.o=.cc)debug: DEFINE += -DDEBUGdebug: BFLAGS = $(DEFINE) $(INCLUDE)debug: CFLAGS = $(CCOPT_DEBUG) $(BFLAGS)debug: $(OBJS) ar crsu libpal_debug.a $(OBJS)libpal.a: $(OBJS) ar crsu libpal.a $(OBJS)cleandeps: $(RM) ./Sources/*.o .depend* coreclean: cleandeps $(RM) ./libpal.a ./libpal_debug.a $(RM) $(ALL)

结果错误是:

Makefile:34: *** missing separator. Stop.

相关文章: