- 论坛徽章:
- 0
|
系统 的makefile文件,make时总是提示:
makefile:20 ***commands commence before first target. Stop.
20line就是"OBJS = \"的下一行。
我是在red hat 6.5下make的。但是我到redhat 7.3和9.0上就没有错误,是不是版本的问题啊?
郁闷死了。大虾们给我看看,我应该怎么改改 让它make成功
### System makefile
CC = g++
LDFLAGS = -L/usr/X11R6/lib -lX11 -lXext -lm -L$(ARIA)/lib -lAria -Xlinker -lstdc++ -Bdynamic -lpthread -ljpeg
CPPFLAGS = -I../include -I./ -I/usr/X11R6/include -I$(ARIA)/include
CFLAGS = -g -Wall -O2 -D_REENTRANT -fno-exceptions $(CPPFLAGS)
CXXFLAGS = $(CFLAGS)
LDLIBS=
TASKDIR = followWall/*.o moveforward/*.o wander/*.o
EXE := RobotServer
#SOURCE := $(wildcard *.cpp)
#OBJS := $(patsubst %.cpp,%.o,$(SOURCE))
OBJS = \
followWall/follow.o followWall/forward.o followWall/swerve.o moveforward/moveforward.o wander/wander.o \
TaskActionGroups.o TaskMode.o TaskModes.o mysync.o mythread.o mysocket.o tcpservthr.o \
JpegCodec.o ImageGrab.o AudioVideoHandler.o AudioVideoControl.o InfoStream.o StreamServer.o \
LocalRobot.o RemoteAction.o RobotThread.o BasedRobot.o robotInterface.o UserProxy.o RobotServer.o \
main.o
.PHONY : all clean
all : $(EXE)
$(EXE) : $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
%.o : %.cpp
$(CC) -c $(CFLAGS) $< -o $@
clean:
-rm -f $(EXE) *.o $(TASKDIR)
followWall/follow.o:followWall/follow.cpp
followWall/forward.o:followWall/forward.cpp
followWall/swerve.o:followWall/swerve.cpp
moveforward/moveforward.o:moveforward/moveforward.cpp
wander/wander.o:wander/wander.cpp
#end makefile |
|