Makefile出现在下面 注意到makefile的第1行的分隔符错误 “ 干净 Makefile:1:***缺少分隔符。停止。 “ / ******************* ************ / / * Blah Blah Blah / / * / / * FOOBAR * / / * FOOBAR * / / * FOOBAR * / / * FOOBAR * / / * FOOBAR / / * / / * FOOBAR * / / * FOOBAR * /
/* */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* */
/* */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR */
/* FOOBAR*/
/* */
/* Makefile */
/*******************************************************************************/
CC = gcc
CXX = g++
CFLAGS = -c -Wall -g -W -I../include/ -I../msgInclude/ -I../nsiInclude/ -I../mfaInclude/ -I../fpgaInclude/
CXXFLAGS = -c -Wall -g -DMULTICAST_EQ36 -W -I../include/ -I../msgInclude/ -I../nsiInclude/ -I../mfaInclude/ -I../fpgaInclude/ -Wno-deprecated
LDFLAGS = -lrt -lnsl -lpthread
OBJDIR = ../obj
EXEDIR = ../p_bin
CDIR = ../c_code
PROG = fast_msg_broker_rtc
EXECUTABLE = $(EXEDIR)/$(PROG)
CXXSOURCES = message_broker.cpp \
a1.cpp \
a2.cpp \
a3.cpp \
a4.cpp
CSOURCES = $(CDIR)/tcc_rta.c
#CSOURCES = $(CDIR)/tcc_rti.c
CXXOBJECTS = $(CXXSOURCES:.cpp=.opp)
COBJECTS = $(CSOURCES:.c=.o)
OBJECTS = $(CXXOBJECTS) $(COBJECTS)
#OBJECTS = $(COBJECTS)
OBJFILES = $(addprefix $(OBJDIR)/, $(OBJECTS))
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJFILES)
$(CXX) $(LDFLAGS) $^ -o $@
$(OBJDIR)/%.opp: %.cpp
$(CXX) $(CXXFLAGS) $< -o $@
$(OBJDIR)/%.o: %.c
echo $(CC) $(CFLAGS) $< -o $@
$(CC) $(CFLAGS) $< -o $@
clean:
-rm -rf $(OBJFILES)
-rm -f $(EXECUTABLE)
clear
答案 0 :(得分:0)
您不能在Makefile中使用C样式注释/* like these */
。
与脚本语言中的许多其他注释一样,Makefile注释在行的开头形成#
:
# FOOBAR
# FOOBAR, FOOBAR. #