linuxcnc裡可執行程式的單獨編譯
阿新 • • 發佈:2018-12-13
比如:bin/milltask,先分別編譯各個.c或.cc檔案,再連結生成milltask可執行檔案.
>cd ~/linuxcnc-dev/src/emc/task >g++ -c ../motion/emcmotglb.c -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c emctask.cc -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c emccanon.cc -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c emctaskmain.cc -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c ../motion/usrmotintf.cc -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c ../motion/emcmotutil.c -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c taskintf.cc -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c ../motion/dbuf.c -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c ../motion/stashf.c -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c ../rs274ngc/tool_parse.cc -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c taskmodule.cc -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c taskclass.cc -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -c backtrace.cc -I../../../include -I../../../src/emc/rs274ngc -I../../../src/emc/pythonplugin -I../../../src/emc/motion -I/usr/local/include -I/usr/include/python2.7 >g++ -o milltask emcmotglb.o emctask.o emccanon.o emctaskmain.o usrmotintf.o emcmotutil.o taskintf.o dbuf.o stashf.o tool_parse.o taskmodule.o taskclass.o backtrace.o ../../../lib/librs274.so.0 ../../../lib/liblinuxcnc.a ../../../lib/libnml.so.0 ../../../lib/liblinuxcncini.so.0 ../../../lib/libposemath.so.0 ../../../lib/liblinuxcnchal.so.0 ../../../lib/libpyplugin.so.0 -L/home/bruce/linuxcnc-dev/lib -Wl,-rpath,/home/bruce/linuxcnc-dev/lib -lboost_python -lpython2.7 -L/usr/lib/x86_64-linux-gnu