Отношение Makefile и SNAP7
Здравствуйте,друзья, у меня нет никакой информации о makefile.Не могли бы вы помочь мне понять это событие?Теперь мне удалось связаться с ПК и ПЛК, это makefile из файла SNAP7, а другой-мой файл .pro из QT Creature.Не могли бы вы объяснить содержание MakeFile?
# # MinGW 32 makefile # # Change vars MINGW and MINREL in accord to your compiler path/release # MINGW =C:/MinGW32 MINREL =4.7.2 # # CPP = g++.exe CC = gcc.exe TEMP =../../temp OBJ = $(TEMP)/win32/snap_msgsock.o $(TEMP)/win32/snap_sysutils.o $(TEMP)/win32/snap_tcpsrvr.o $(TEMP)/win32/snap_threads.o $(TEMP)/win32/s7_client.o $(TEMP)/win32/s7_isotcp.o $(TEMP)/win32/s7_micro_client.o $(TEMP)/win32/s7_partner.o $(TEMP)/win32/s7_peer.o $(TEMP)/win32/s7_server.o $(TEMP)/win32/s7_text.o $(TEMP)/win32/snap7_libmain.o LINKOBJ = $(TEMP)/win32/snap_msgsock.o $(TEMP)/win32/snap_sysutils.o $(TEMP)/win32/snap_tcpsrvr.o $(TEMP)/win32/snap_threads.o $(TEMP)/win32/s7_client.o $(TEMP)/win32/s7_isotcp.o $(TEMP)/win32/s7_micro_client.o $(TEMP)/win32/s7_partner.o $(TEMP)/win32/s7_peer.o $(TEMP)/win32/s7_server.o $(TEMP)/win32/s7_text.o $(TEMP)/win32/snap7_libmain.o LIBS = -L"$(MINGW)/lib" -static-libgcc --no-export-all-symbols --add-stdcall-alias $(MINGW)/lib/libws2_32.a $(MINGW)/lib/libwinmm.a $(MINGW)/lib/gcc/mingw32/$(MINREL)/libstdc++.a INCS = -I"$(MINGW)/include" -I"../../../src/sys" -I"../../../src/core" -I"../../../src/lib" CXXINCS = -I"$(MINGW)/include" -I"../../../src/sys" -I"../../../src/core" -I"../../../src/lib" OUTPATH = ../../bin/Legacy/win32/ DLL = snap7.dll OUTLIB = $(OUTPATH)snap7.lib BIN = $(OUTPATH)$(DLL) CXXFLAGS = $(CXXINCS) -DBUILDING_DLL=1 -Ofast -pedantic CFLAGS = $(INCS) -DBUILDING_DLL=1 RM = rm -f .PHONY: all all-before all-after clean clean-custom all: all-before $(BIN) all-after DLLWRAP=dllwrap.exe DLLTOOL=dlltool.exe DEFFILE=$(OUTPATH)snap7.def clean: clean-custom ${RM} $(OBJ) $(BIN) $(OUTLIB) $(DEFFILE) $(BIN): $(LINKOBJ) $(DLLWRAP) --output-def $(DEFFILE) --driver-name c++ $(LINKOBJ) $(LIBS) -o $(BIN) $(TEMP)/win32/snap_msgsock.o: ../../../src/sys/snap_msgsock.cpp $(CPP) -c ../../../src/sys/snap_msgsock.cpp -o $(TEMP)/win32/snap_msgsock.o $(CXXFLAGS) $(TEMP)/win32/snap_sysutils.o: ../../../src/sys/snap_sysutils.cpp $(CPP) -c ../../../src/sys/snap_sysutils.cpp -o $(TEMP)/win32/snap_sysutils.o $(CXXFLAGS) $(TEMP)/win32/snap_tcpsrvr.o: ../../../src/sys/snap_tcpsrvr.cpp $(CPP) -c ../../../src/sys/snap_tcpsrvr.cpp -o $(TEMP)/win32/snap_tcpsrvr.o $(CXXFLAGS) $(TEMP)/win32/snap_threads.o: ../../../src/sys/snap_threads.cpp $(CPP) -c ../../../src/sys/snap_threads.cpp -o $(TEMP)/win32/snap_threads.o $(CXXFLAGS) $(TEMP)/win32/s7_client.o: ../../../src/core/s7_client.cpp $(CPP) -c ../../../src/core/s7_client.cpp -o $(TEMP)/win32/s7_client.o $(CXXFLAGS) $(TEMP)/win32/s7_isotcp.o: ../../../src/core/s7_isotcp.cpp $(CPP) -c ../../../src/core/s7_isotcp.cpp -o $(TEMP)/win32/s7_isotcp.o $(CXXFLAGS) $(TEMP)/win32/s7_micro_client.o: ../../../src/core/s7_micro_client.cpp $(CPP) -c ../../../src/core/s7_micro_client.cpp -o $(TEMP)/win32/s7_micro_client.o $(CXXFLAGS) $(TEMP)/win32/s7_partner.o: ../../../src/core/s7_partner.cpp $(CPP) -c ../../../src/core/s7_partner.cpp -o $(TEMP)/win32/s7_partner.o $(CXXFLAGS) $(TEMP)/win32/s7_peer.o: ../../../src/core/s7_peer.cpp $(CPP) -c ../../../src/core/s7_peer.cpp -o $(TEMP)/win32/s7_peer.o $(CXXFLAGS) $(TEMP)/win32/s7_server.o: ../../../src/core/s7_server.cpp $(CPP) -c ../../../src/core/s7_server.cpp -o $(TEMP)/win32/s7_server.o $(CXXFLAGS) $(TEMP)/win32/s7_text.o: ../../../src/core/s7_text.cpp $(CPP) -c ../../../src/core/s7_text.cpp -o $(TEMP)/win32/s7_text.o $(CXXFLAGS) $(TEMP)/win32/snap7_libmain.o: ../../../src/lib/snap7_libmain.cpp $(CPP) -c ../../../src/lib/snap7_libmain.cpp -o $(TEMP)/win32/snap7_libmain.o $(CXXFLAGS) all-after: $(DLLTOOL) -D $(DLL) -d $(DEFFILE) -l $(OUTLIB)
Что я уже пробовал:
#------------------------------------------------- # # Project created by QtCreator 2018-01-19T16:14:23 # #------------------------------------------------- QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = C41 TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which has been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 win32:LIBS += C:\Qt\Tools\mingw530_32\i686-w64-mingw32\lib\libws2_32.a win32:LIBS += C:\Qt\Tools\mingw530_32\i686-w64-mingw32\lib\libwinmm.a INCLUDEPATH += C:\Users\Emrah\Desktop\snap7-full-1.4.2\snap7-full-1.4.2\release\Wrappers\c-cpp INCLUDEPATH += C:\Users\Emrah\Desktop\snap7-full-1.4.2\snap7-full-1.4.2\src\core INCLUDEPATH +=C:\Users\Emrah\Desktop\snap7-full-1.4.2\snap7-full-1.4.2\src\lib INCLUDEPATH +=C:\Users\Emrah\Desktop\snap7-full-1.4.2\snap7-full-1.4.2\src\sys SOURCES += \ main.cpp \ mainwindow.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_client.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_isotcp.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_micro_client.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_partner.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_peer.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_server.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_text.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/lib/snap7_libmain.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/snap_msgsock.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/snap_sysutils.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/snap_tcpsrvr.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/snap_threads.cpp \ ../../snap7-full-1.4.2/snap7-full-1.4.2/release/Wrappers/c-cpp/snap7.cpp \ dialogdkcs.cpp HEADERS += \ mainwindow.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_client.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_firmware.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_isotcp.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_micro_client.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_partner.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_peer.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_server.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_text.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/core/s7_types.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/lib/snap7_libmain.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/snap_msgsock.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/snap_platform.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/snap_sysutils.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/snap_tcpsrvr.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/snap_threads.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/sol_threads.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/unix_threads.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/src/sys/win_threads.h \ ../../snap7-full-1.4.2/snap7-full-1.4.2/release/Wrappers/c-cpp/snap7.h \ dialogdkcs.h FORMS += \ mainwindow.ui \ dialogdkcs.ui RESOURCES += \ picture.qrc