Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÖ®Makefile (¶þ)

¾Å¡¢Ä£Ê½±äÁ¿
ÔÚGNUµÄmakeÖУ¬»¹Ö§³Öģʽ±äÁ¿£¨Pattern-specific Variable£©£¬Í¨¹ýÉÏÃæµÄÄ¿±ê±äÁ¿ÖУ¬ÎÒÃÇÖªµÀ£¬±äÁ¿¿ÉÒÔ¶¨ÒåÔÚij¸öÄ¿±êÉÏ¡£Ä£Ê½±äÁ¿µÄºÃ´¦¾ÍÊÇ£¬ÎÒÃÇ¿ÉÒÔ¸ø¶¨Ò»Ö֓ģʽ”£¬¿ÉÒ԰ѱäÁ¿¶¨ÒåÔÚ·ûºÏÕâÖÖģʽµÄËùÓÐÄ¿±êÉÏ¡£
ÎÒÃÇÖªµÀ£¬makeµÄ“ģʽ”Ò»°ãÊÇÖÁÉÙº¬ÓÐÒ»¸ö“%”µÄ£¬ËùÒÔ£¬ÎÒÃÇ¿ÉÒÔÒÔÈçÏ·½Ê½¸øËùÓÐÒÔ[.o]½áβµÄÄ¿±ê¶¨ÒåÄ¿±ê±äÁ¿£º
    %.o : CFLAGS = -O
ͬÑù£¬Ä£Ê½±äÁ¿µÄÓï·¨ºÍ“Ä¿±ê±äÁ¿”Ò»Ñù£º
    <pattern ...>; : <variable-assignment>;
    <pattern ...>; : override <variable-assignment>;
overrideͬÑùÊÇÕë¶ÔÓÚϵͳ»·¾³´«ÈëµÄ±äÁ¿£¬»òÊÇmakeÃüÁîÐÐÖ¸¶¨µÄ±äÁ¿¡£
 
ʹÓÃÌõ¼þÅжÏ
——————
ʹÓÃÌõ¼þÅжϣ¬¿ÉÒÔÈÃmake¸ù¾ÝÔËÐÐʱµÄ²»Í¬Çé¿öÑ¡Ôñ²»Í¬µÄÖ´ÐзÖÖ§¡£Ìõ¼þ±í´ïʽ¿ÉÒÔÊDZȽϱäÁ¿µÄÖµ£¬»òÊDZȽϱäÁ¿ºÍ³£Á¿µÄÖµ¡£
Ò»¡¢Ê¾Àý
ÏÂÃæµÄÀý×Ó£¬ÅжÏ$(CC)±äÁ¿ÊÇ·ñ“gcc”£¬Èç¹ûÊǵĻ°£¬ÔòʹÓÃGNUº¯Êý±àÒëÄ¿±ê¡£
    libs_for_gcc = -lgnu
    normal_libs =
    foo: $(objects)
    ifeq ($(CC),gcc)
            $(CC) -o foo $(objects) $(libs_for_gcc)
    else
            $(CC) -o foo $(objects) $(normal_libs)
    endif
¿É¼û£¬ÔÚÉÏÃæʾÀýµÄÕâ¸ö¹æÔòÖУ¬Ä¿±ê“foo”¿ÉÒÔ¸ù¾Ý±äÁ¿“$(CC)”ÖµÀ´Ñ¡È¡²»Í¬µÄº¯Êý¿âÀ´±àÒë³ÌÐò¡£
ÎÒÃÇ¿ÉÒÔ´ÓÉÏÃæµÄʾÀýÖп´µ½Èý¸ö¹Ø¼ü×Ö£ºifeq¡¢elseºÍendif¡£ifeqµÄÒâ˼±íʾÌõ¼þÓï¾äµÄ¿ªÊ¼£¬²¢Ö¸¶¨Ò»¸öÌõ¼þ±í´ïʽ£¬±í´ïʽ°üº¬Á½¸ö²ÎÊý£¬ÒÔ¶ººÅ·Ö¸ô£¬±í´ïʽÒÔÔ²À¨ºÅÀ¨Æð¡£else±íʾÌõ¼þ±í´ïʽΪ¼ÙµÄÇé¿ö¡£endif±íʾһ¸öÌõ¼þÓï¾äµÄ½áÊø£¬ÈκÎÒ»¸öÌõ¼þ±í´ïʽ¶¼Ó¦¸ÃÒÔendif½áÊø¡£
µ±ÎÒÃǵıäÁ¿$(CC)ÖµÊÇ“gcc”ʱ£¬Ä¿±êfooµÄ¹æÔòÊÇ£º
    foo: $(objects)
            $(CC) -o foo $(objects) $(libs_for_gcc)
¶øµ±ÎÒÃǵıäÁ¿$(CC)Öµ²


Ïà¹ØÎĵµ£º

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

¡¾×ª¡¿LinuxµÄͼÐλ¯×ÀÃæ¹ÜÀí¡úĿ¼¹ÜÀíµÄ»ù´¡ÖªÊ¶

 ÔÚLinuxϵͳÉÏÃüÃûĿ¼µÄ·½Ê½ÊÇÏ൱ÒþÃصģ¬ÕâҪ׷Ëݵ½µçÄÔÓ²¼þ´¦ÀíÄÜÁ¦±È½ÏÈõ¶ø¼Û¸ñÓֱȽϹóµÄʱÆÚ¡£ÔÚLinuxϵͳÉÏÃüÃûĿ¼µÄ·½Ê½ËƺõÓе㱿׾£¬µ«ÓëÆäËûµÄÿ¼þÊÂÇéÒ»Ñù£¬ÕâÖ»Ð軨һЩʱ¼ä¼ÓÒÔÏ°¹ß¡£Í¨¹ýÃèÊöLinuxÎļþϵͳµÄÈ«¾°£¬Ê¹¶ÁÕß¿ÉÒÔ¶ÔLinuxµÄÎļþϵͳÓнÏÇå³þµÄÈÏʶ¡£
¸ùĿ¼(/)
¡¡¡¡Ä¿Â¼½á¹¹ÉϵÄ×î¸ßµã± ......

Linux ϲ¿ÊðwebÏîÄ¿

 1¡¢ µ±°ÑÏîÄ¿ÅäÉÏÓòÃûʱ£¬±ØÐë°ÑtomcatµÄ¶Ë¿Ú¸ÄΪ80£¬×¢Òâµ±Ìæ»»ÅäÖÃÎļþʱ£¬Òª¼ÇµÃ°Ñtomcat¶Ë¿Ú¸Äһϡ£
2¡¢ CÅÌϵÄhostsÎļþ£¬ÊÇÅäÖÃÓòÃûÓõģ¬µ±²»ÔÚhostsÅäÖÃÓòÃûʱ£¬windowsϵͳ»áµ½ÍâÍøÈ¥ÕÒ·ûºÏµÄÓòÃû£¬µ±ÔÚhostsÏÂÅäÖÃÓòÃûʱ£¬¾Í²»»áµ½ÍâÍøÈ¥ÕÒÁË¡£
3¡¢ Îļþ¸üеÄÕû¸öÁ÷³Ì£º
£¨1£©£ºÓÃÔ¶³ ......

linuxÃæÊÔÌâÄ¿£¨×ª£©

 
Ò»£®Ìî¿ÕÌ⣺
1. ÔÚLinux
ϵͳ
ÖУ¬ÒÔ
Îļþ
·½Ê½·ÃÎÊÉ豸 ¡£
2. LinuxÄÚºËÒýµ¼Ê±£¬´ÓÎļþ/etc/fstab
ÖжÁÈ¡Òª¼ÓÔصÄÎļþϵͳ
¡£
3. LinuxÎļþϵͳÖÐÿ¸öÎļþÓÃi½Úµã
À´±êʶ¡£
4. È«²¿´ÅÅÌ¿éÓÉËĸö²¿·Ö×é³É£¬·Ö±ðΪÒýµ¼¿é ¡¢×¨ÓÃ¿é ¡¢ i½Úµã±í¿é ºÍ
Êý¾Ý
´æ´¢¿é
¡£
5. Á´½Ó·ÖΪ£ºÓ²Á´½Ó ºÍ ·ûºÅÁ´½Ó ......

LinuxÖ®Makefile (Ò»)

 ¸ÅÊö
——
ʲôÊÇmakefile£¿»òÐíºÜ¶àWinodwsµÄ³ÌÐòÔ±¶¼²»ÖªµÀÕâ¸ö¶«Î÷£¬ÒòΪÄÇЩWindowsµÄIDE¶¼ÎªÄã×öÁËÕâ¸ö¹¤×÷£¬µ«ÎÒ¾õµÃÒª×÷Ò»¸öºÃµÄºÍprofessionalµÄ³ÌÐòÔ±£¬makefile»¹ÊÇÒª¶®¡£Õâ¾ÍºÃÏñÏÖÔÚÓÐÕâô¶àµÄHTMLµÄ±à¼­Æ÷£¬µ«Èç¹ûÄãÏë³ÉΪһ¸öרҵÈËÊ¿£¬Ä㻹ÊÇÒªÁ˽âHTMLµÄ±êʶµÄº¬Òå¡£ÌرðÔÚUnixϵÄÈí¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ