我對makefile相當陌生。你能幫我糾正一下下面的makefile:make:***目標`gcc'沒有規則,'Employee.o'需要。停止
我已經創建了一個Employee類。經理類從派生類派生。 Link類具有Employee和Manager類的引用。
錯誤:
make: *** No rule to make target `gcc', needed by `Employee.o'. Stop.
的Makefile:
CC = gcc
TOP=/usr/local/share/cimple
ROOT= $(PEGASUS_ROOT)
##BINDIR= ${PEGASUS_HOME}/bld/bin
TARGET = ${PEGASUS_HOME}/lib/libEmployee.so
LIBRARY_FLAGS = -L${PEGASUS_HOME}/lib
##PROVIDERROOT = $(PEGASUS_ROOT)/../providers
INSTANCE_PROVIDER_OBJECTS = Employee.o Manager.o Link.o module.o repository.o Employee_Provider.o Manager_Provider.o Link_Provider.o
COMPILE_FLAGS = -W -Wall -g -fPIC
LINK_FLAGS = -W -Wall -g -shared
EXTRA_INCLUDES = -I$(PROVIDERROOT) -I${PEGASUS_ROOT}/src
LIBRARIES = pegcommon pegprovider
DYNAMIC_LIBRARIES = -lpegcommon -lpegprovider
include $(TOP)/mak/config.mak
MODULE=1
SHARED_LIBRARY=Employee
##
## Define source files for compile and link
##
SOURCES += Employee.cpp
SOURCES += Manager.cpp
SOURCES += Link.cpp
SOURCES += module.cpp
SOURCES += repository.cpp
SOURCES += Employee_Provider.cpp
SOURCES += Manager_Provider.cpp
SOURCES += Link_Provider.cpp
##
## Module defined as Pegasus C++ interface
##
CIMPLE_PEGASUS_MODULE=1
DEFINES += -DCIMPLE_PEGASUS_MODULE
LIBRARIES += cimplepegadap
LIBRARIES += cimple
include $(TOP)/mak/rules.mak
${TARGET} : ${INSTANCE_PROVIDER_OBJECTS} Makefile ${CC} ${LINK_FLAGS} ${LIBRARY_FLAGS} -o ${TARGET} ${INSTANCE_PROVIDER_OBJECTS} ${DYNAMIC_LIBRARIES}
Employee.o : Employee.cpp Makefile Employee.h ${CC} ${COMPILE_FLAGS} ${EXTRA_INCLUDES} -c Employee.cpp
Manager.o : Manager.cpp Makefile Manager.h ${CC} ${COMPILE_FLAGS} ${EXTRA_INCLUDES} -c Manager.cpp
Link.o : Link.cpp Makefile Link.h ${CC} ${COMPILE_FLAGS} ${EXTRA_INCLUDES} -c Link.cpp
repository.o : repository.cpp Makefile repository.h ${CC} ${COMPILE_FLAGS} ${EXTRA_INCLUDES} -c repository.cpp
module.o : module.cpp Makefile module.h ${CC} -DCIMPLE_PEGASUS_MODULE ${COMPILE_FLAGS} ${EXTRA_INCLUDES} -c module.cpp
Employee_Provider.o : Employee_Provider.cpp Makefile Employee_Provider.h ${CC} ${COMPILE_FLAGS} ${EXTRA_INCLUDES} -c Employee_Provider.cpp
Manager_Provider.o : Manager_Provider.cpp Makefile Manager_Provider.h ${CC} ${COMPILE_FLAGS} ${EXTRA_INCLUDES} -c Manager_Provider.cpp
Link_Provider.o : Link_Provider.cpp Makefile Link_Provider.h ${CC} ${COMPILE_FLAGS} ${EXTRA_INCLUDES} -c Link_Provider.cpp
我收到上述error.Any幫助將非常感謝!提前致謝!
添加進入和製表符。在makefile中他們是至關重要的。 – elyashiv