MAKE Problem
-
Hallo,
ich habe folgendes Makefile:
# # OMNeT++/OMNEST Makefile for libubeeme_serialization # # This file was generated with the command: # opp_makemake -f --deep -s -oubeeme_serialization -O/home/XXXXX/ubeeme/source/out/core/serialization /home/XXXXX/ubeeme/source/src/core/serialization -I/home/XXXXX/ubeeme/source/src/core/serialization -I/home/XXXXX/ubeeme/source/src/common # # Name of target to be created (-o option) TARGET = libubeeme_serialization$(SHARED_LIB_SUFFIX) # C++ include paths (with -I) INCLUDE_PATH = -I/home/XXXXX/ubeeme/source/src/core/serialization -I/home/XXXXX/ubeeme/source/src/common -I. # Additional object and library files to link with EXTRA_OBJS = /home/XXXXX/ubeeme/source/src/core/serialization # Additional libraries (-L, -l options) LIBS = # Output directory PROJECT_OUTPUT_DIR = /home/XXXXX/ubeeme/source/out/core/serialization PROJECTRELATIVE_PATH = O = $(PROJECT_OUTPUT_DIR)/$(CONFIGNAME)/$(PROJECTRELATIVE_PATH) # Object files for local .cpp and .msg files OBJS = \ $O/archive.o \ $O/byte_array_calculator.o \ $O/byte_array_destination.o \ $O/byte_array_source.o \ $O/serializable.o \ $O/serialize_destination.o \ $O/serialize_source.o # Message files MSGFILES = #------------------------------------------------------------------------------ # Pull in OMNeT++ configuration (Makefile.inc or configuser.vc) ifneq ("$(OMNETPP_CONFIGFILE)","") CONFIGFILE = $(OMNETPP_CONFIGFILE) else ifneq ("$(OMNETPP_ROOT)","") CONFIGFILE = $(OMNETPP_ROOT)/Makefile.inc else CONFIGFILE = $(shell opp_configfilepath) endif endif ifeq ("$(wildcard $(CONFIGFILE))","") $(error Config file '$(CONFIGFILE)' does not exist -- add the OMNeT++ bin directory to the path so that opp_configfilepath can be found, or set the OMNETPP_CONFIGFILE variable to point to Makefile.inc) endif include $(CONFIGFILE) # Simulation kernel and user interface libraries OMNETPP_LIB_SUBDIR = $(OMNETPP_LIB_DIR)/$(TOOLCHAIN_NAME) OMNETPP_LIBS = -L"$(OMNETPP_LIB_SUBDIR)" -L"$(OMNETPP_LIB_DIR)" -loppenvir$D $(KERNEL_LIBS) $(SYS_LIBS) COPTS = $(CFLAGS) $(INCLUDE_PATH) -I$(OMNETPP_INCL_DIR) MSGCOPTS = $(INCLUDE_PATH) # we want to recompile everything if COPTS changes, # so we store COPTS into $COPTS_FILE and have object # files depend on it (except when "make depend" was called) COPTS_FILE = $O/.last-copts ifneq ($(MAKECMDGOALS),depend) ifneq ("$(COPTS)","$(shell cat $(COPTS_FILE) 2>/dev/null || echo '')") $(shell $(MKPATH) "$O" && echo "$(COPTS)" >$(COPTS_FILE)) endif endif #------------------------------------------------------------------------------ # User-supplied makefile fragment(s) # >>> # <<< #------------------------------------------------------------------------------ # Main target all: $(TARGET) $(TARGET) : $O/$(TARGET) $(LN) $O/$(TARGET) . $O/$(TARGET): $(OBJS) $(wildcard $(EXTRA_OBJS)) Makefile @$(MKPATH) $O $(SHLIB_LD) -o $O/$(TARGET) $(OBJS) $(EXTRA_OBJS) $(LIBS) $(OMNETPP_LIBS) $(LDFLAGS) $(SHLIB_POSTPROCESS) $O/$(TARGET) .PHONY: .SUFFIXES: .cpp $O/%.o: %.cpp $(COPTS_FILE) @$(MKPATH) $(dir $@) $(CXX) -c $(COPTS) -o $@ $< %_m.cpp %_m.h: %.msg $(MSGC) -s _m.cpp $(MSGCOPTS) $? msgheaders: $(MSGFILES:.msg=_m.h) clean: -rm -rf $O -rm -f ubeeme_serialization ubeeme_serialization.exe libubeeme_serialization.so libubeeme_serialization.a libubeeme_serialization.dll libubeeme_serialization.dylib -rm -f ./*_m.cpp ./*_m.h cleanall: clean -rm -rf $(PROJECT_OUTPUT_DIR) depend: $(MAKEDEPEND) $(INCLUDE_PATH) -f Makefile -P\$$O/ -- $(MSG_CC_FILES) ./*.cpp # DO NOT DELETE THIS LINE -- make depend depends on it. $O/archive.o: archive.cpp \ ./../../common/byte_array.h \ ./../../common/ubeeme_global.h \ ./../../common/types.h \ ./archive.h $O/byte_array_calculator.o: byte_array_calculator.cpp \ ./../../common/ubeeme_global.h \ ./../../common/endian.h \ ./../../common/byte_array.h \ ./byte_array_calculator.h \ ./../../common/types.h \ ./archive.h \ ./serializable.h $O/byte_array_destination.o: byte_array_destination.cpp \ ./../../common/ubeeme_global.h \ ./../../common/endian.h \ ./../../common/byte_array.h \ ./../../common/types.h \ ./serialize_destination.h \ ./archive.h \ ./byte_array_destination.h \ ./serializable.h $O/byte_array_source.o: byte_array_source.cpp \ ./../../common/ubeeme_global.h \ ./../../common/endian.h \ ./../../common/byte_array.h \ ./serialize_source.h \ ./../../common/types.h \ ./byte_array_source.h \ ./archive.h \ ./serializable.h $O/serializable.o: serializable.cpp \ ./../../common/byte_array.h \ ./serialize_source.h \ ./byte_array_source.h \ ./serializable.h \ ./byte_array_calculator.h \ ./../../common/ubeeme_global.h \ ./../../common/endian.h \ ./../../common/types.h \ ./serialize_destination.h \ ./archive.h \ ./byte_array_destination.h $O/serialize_destination.o: serialize_destination.cpp \ ./../../common/byte_array.h \ ./serializable.h \ ./../../common/ubeeme_global.h \ ./../../common/endian.h \ ./../../common/types.h \ ./serialize_destination.h \ ./archive.h $O/serialize_source.o: serialize_source.cpp \ ./../../common/byte_array.h \ ./serialize_source.h \ ./serializable.h \ ./../../common/ubeeme_global.h \ ./../../common/endian.h \ ./../../common/types.h \ ./archive.h
Wenn ich hier make all mache, bekomme ich allerdings folgenden Fehler:
cd /home/XXXXXX/ubeeme/source/src/core/serialization && /usr/bin/gmake all gmake[1]: Entering directory `/home/XXXXXX/ubeeme/source/src/core/serialization' g++ -shared -fPIC -o /home/XXXXXX/ubeeme/source/out/core/serialization/gcc-debug//libubeeme_serialization.so /home/XXXXXX/ubeeme/source/out/core/serialization/gcc-debug//archive.o /home/XXXXXX/ubeeme/source/out/core/serialization/gcc-debug//byte_array_calculator.o /home/XXXXXX/ubeeme/source/out/core/serialization/gcc-debug//byte_array_destination.o /home/XXXXXX/ubeeme/source/out/core/serialization/gcc-debug//byte_array_source.o /home/XXXXXX/ubeeme/source/out/core/serialization/gcc-debug//serializable.o /home/XXXXXX/ubeeme/source/out/core/serialization/gcc-debug//serialize_destination.o /home/XXXXXX/ubeeme/source/out/core/serialization/gcc-debug//serialize_source.o /home/XXXXXX/ubeeme/source/src/core/serialization -L"/opt/omnetpp-4.2rc2/lib/gcc" -L"/opt/omnetpp-4.2rc2/lib" -loppenvird -loppsimd -ldl -lstdc++ -Wl,-rpath,/opt/omnetpp-4.2rc2/lib -Wl,-rpath,. /home/XXXXXX/ubeeme/source/src/core/serialization: file not recognized: Is a directory collect2: ld returned 1 exit status gmake[1]: *** [/home/XXXXXX/ubeeme/source/out/core/serialization/gcc-debug//libubeeme_serialization.so] Error 1 gmake[1]: Leaving directory `/home/XXXXXX/ubeeme/source/src/core/serialization' gmake: *** [UBeeMeLibs] Error 2
Kann mir jemand sagen, was bei dem Makefile falsch ist? Irgendwie sehe ich keinen Fehler. ???
Vielen Dank. charlie
-
Mir scheint doch Zeile 15 etwas suspekt.
Es ist ja dann im folgenden auch der Linker der nicht weiterarbeiten kann...
-
Dieser Thread wurde von Moderator/in SeppJ aus dem Forum C++ (auch C++0x und C++11) in das Forum Rund um die Programmierung verschoben.
Im Zweifelsfall bitte auch folgende Hinweise beachten:
C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?Dieses Posting wurde automatisch erzeugt.
-
hallo snoopy,
vielen Dank. Die Zeile war es in der Tat! Super. Nun muß ich nur noch sehen, wie ich das Buildtool dazubekomme, diese Zeile wegzulassen
Ich danke auf jeden Fall.
charlie