Linux makefileÏê½â
³Âð© (CSDN)
¸ÅÊö
——
ʲôÊÇmakefile£¿»òÐíºÜ¶àWinodwsµÄ³ÌÐòÔ±¶¼²»ÖªµÀÕâ¸ö¶«Î÷£¬ÒòΪÄÇЩWindowsµÄIDE¶¼ÎªÄã×öÁËÕâ¸ö¹¤×÷£¬µ«ÎÒ¾õµÃÒª×÷Ò»¸öºÃµÄºÍprofessionalµÄ³ÌÐòÔ±£¬makefile»¹ÊÇÒª¶®¡£Õâ¾ÍºÃÏñÏÖÔÚÓÐÕâô¶àµÄHTMLµÄ±à¼Æ÷£¬µ«Èç¹ûÄãÏë³ÉΪһ¸öרҵÈËÊ¿£¬Ä㻹ÊÇÒªÁ˽âHTMLµÄ±êʶµÄº¬Òå¡£ÌرðÔÚUnixϵÄÈí¼þ±àÒ룬Äã¾Í²»Äܲ»×Ô¼ºÐ´makefileÁË£¬»á²»»áдmakefile£¬´ÓÒ»¸ö²àÃæ˵Ã÷ÁËÒ»¸öÈËÊÇ·ñ¾ß±¸Íê³É´óÐ͹¤³ÌµÄÄÜÁ¦¡£
ÒòΪ£¬makefile¹Øϵµ½ÁËÕû¸ö¹¤³ÌµÄ±àÒë¹æÔò¡£Ò»¸ö¹¤³ÌÖеÄÔ´Îļþ²»¼ÆÊý£¬Æä°´ÀàÐÍ¡¢¹¦ÄÜ¡¢Ä£¿é·Ö±ð·ÅÔÚÈô¸É¸öĿ¼ÖУ¬makefile¶¨ÒåÁËһϵÁеĹæÔòÀ´Ö¸¶¨£¬ÄÄЩÎļþÐèÒªÏȱàÒ룬ÄÄЩÎļþÐèÒªºó±àÒ룬ÄÄЩÎļþÐèÒªÖØбàÒ룬ÉõÖÁÓÚ½øÐиü¸´ÔӵŦÄܲÙ×÷£¬ÒòΪmakefile¾ÍÏñÒ»¸öShell½Å±¾Ò»Ñù£¬ÆäÖÐÒ²¿ÉÒÔÖ´ÐвÙ×÷ϵͳµÄÃüÁî¡£
makefile´øÀ´µÄºÃ´¦¾ÍÊÇ——“×Ô¶¯»¯±àÒ딣¬Ò»µ©Ð´ºÃ£¬Ö»ÐèÒªÒ»¸ömakeÃüÁÕû¸ö¹¤³ÌÍêÈ«×Ô¶¯±àÒ룬¼«´óµÄÌá¸ßÁËÈí¼þ¿ª·¢µÄЧÂÊ¡£makeÊÇÒ»¸öÃüÁ¾ß£¬ÊÇÒ»¸ö½âÊÍmakefileÖÐÖ¸ÁîµÄÃüÁ¾ß£¬Ò»°ãÀ´Ëµ£¬´ó¶àÊýµÄIDE¶¼ÓÐÕâ¸öÃüÁ±ÈÈ磺DelphiµÄmake£¬Visual C++µÄnmake£¬LinuxÏÂGNUµÄmake¡£¿É¼û£¬makefile¶¼³ÉΪÁËÒ»ÖÖÔÚ¹¤³Ì·½ÃæµÄ±àÒë·½·¨¡£
ÏÖÔÚ½²ÊöÈçºÎдmakefileµÄÎÄÕ±ȽÏÉÙ£¬ÕâÊÇÎÒÏëдÕâƪÎÄÕµÄÔÒò¡£µ±È»£¬²»Í¬²úÉ̵Ämake¸÷²»Ïàͬ£¬Ò²Óв»Í¬µÄÓï·¨£¬µ«Æä±¾Öʶ¼ÊÇÔÚ“ÎļþÒÀÀµÐÔ”ÉÏ×öÎÄÕ£¬ÕâÀÎÒ½ö¶ÔGNUµÄmake½øÐн²Êö£¬ÎҵĻ·¾³ÊÇRedHat Linux 8.0£¬makeµÄ°æ±¾ÊÇ3.80¡£±Ø¾¹£¬Õâ¸ömakeÊÇÓ¦ÓÃ×îΪ¹ã·ºµÄ£¬Ò²ÊÇÓõÃ×î¶àµÄ¡£¶øÇÒÆ仹ÊÇ×î×ñÑÓÚIEEE 1003.2-1992 ±ê×¼µÄ£¨POSIX.2£©¡£
ÔÚÕâƪÎĵµÖУ¬½«ÒÔC/C++µÄÔ´Âë×÷ΪÎÒÃÇ»ù´¡£¬ËùÒÔ±ØÈ»É漰һЩ¹ØÓÚC/C++µÄ±àÒëµÄ֪ʶ£¬Ïà¹ØÓÚÕâ·½ÃæµÄÄÚÈÝ£¬»¹Çë¸÷λ²é¿´Ïà¹ØµÄ±àÒëÆ÷µÄÎĵµ¡£ÕâÀïËùĬÈϵıàÒëÆ÷ÊÇUNIXϵÄGCCºÍCC¡£
¹ØÓÚ³ÌÐòµÄ±àÒëºÍÁ´½Ó
——————————
ÔÚ´Ë£¬ÎÒÏë¶à˵¹ØÓÚ³ÌÐò±àÒëµÄһЩ¹æ·¶ºÍ·½·¨£¬Ò»°ãÀ´Ëµ£¬ÎÞÂÛÊÇC¡¢C++¡¢»¹ÊÇpas£¬Ê×ÏÈÒª°ÑÔ´Îļþ±àÒë³ÉÖмä´úÂëÎļþ£¬ÔÚWindowsÏÂÒ²¾ÍÊÇ .obj Îļþ£¬UNIXÏÂÊÇ .o Îļþ£¬¼´ Object File£¬Õâ¸ö¶¯×÷½Ð×ö±àÒ루compile£©¡£È»ºóÔÙ°Ñ´óÁ¿µÄObject FileºÏ³ÉÖ´ÐÐÎļþ£¬Õâ¸ö¶¯×÷½Ð×÷Á´½Ó£¨link£©¡£
±àÒëʱ£¬±àÒëÆ÷ÐèÒªµÄÊÇÓï·¨µÄÕýÈ·£¬º¯ÊýÓë±äÁ¿µÄÉùÃ÷µÄÕýÈ·¡£¶ÔÓÚºóÕߣ¬Í
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
À´×Ô£º ÑîÖ¾¸Õ ²©¿Í (http://yangzhigang.cublog.cn
)
ÔÚwindowsÏ£¬Ò»¸öÎļþÓУº´´½¨Ê±¼ä¡¢ÐÞ¸Äʱ¼ä¡¢·ÃÎÊʱ¼ä¡£
¶øÔÚLinuxÏ£¬Ò»¸öÎļþÒ²ÓÐÈýÖÖʱ¼ä£¬·Ö±ðÊÇ£º·ÃÎÊʱ¼ä¡¢ÐÞ¸Äʱ¼ä¡¢×´Ì¬¸Ä¶¯Ê±¼ä
¡£
Á½ÕßÓд˲»Í¬£¬ÔÚLinuxÏÂûÓд´½¨Ê±¼äµÄ¸ÅÄî
£¬Ò²¾ÍÊDz»ÄÜÖªµÀÎļþµÄ
½¨Á¢Ê±¼ä£¬µ«Èç¹ûÎļþ½¨Á¢ºó ......
ÔÚ/etc/rc.d/rc.localÎļþÀïÌí¼ÓÒ»ÐÐÃüÁî:echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
ÕâÑùÿ´ÎÆô¶¯ÏµÍ³ºó¶¼½«×Ô¶¯ÔËÐУ¬¿ÉÒÔ×èÖ¹ÄãµÄϵͳÏìÓ¦ÈκδÓÍⲿ/ÄÚ²¿À´µÄpingÇëÇó£¬
¾ÍûÓÐÈËÄÜpingͨÄãµÄ»úÆ÷²¢ÊÕµ½ÏìÓ¦£¬¿ÉÒÔ´ó´óÔöÇ¿Õ¾µãºÍϵͳµÄ°²È«ÐÔ¡£ ......
/ ¸ùĿ¼
©¦
©Àboot/ LinuxµÄÄں˼°ÏµÍ³Òýµ¼³ÌÐòËùÐèÒªµÄÎļþĿ¼
©¦ ©¸grub/ GrubÒýµ¼Æ÷Ïà¹ØµÄÎļþ
©¦
&n ......
route add -net 10.10.101.0 netmask 255.255.255.0 gw 10.10.100.1
cat route-eth0
10.10.101.0/24 via 10.10.100.1 dev eth0
/etc/rc.d/init.d/network restart
netstat -r
[root@1314it network-scripts]# cat /etc/sysconfig/network-scripts/route-eth0
123.123.123.0 via 156.156.156.156 de ......