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

Linux GCC makeÎļþµÄд·¨3

 °üº¬3¸öÎļþ¼Ð
Ŀ¼×éÖ¯½á¹¹ÈçÏ£º
inc/hello.h
main/main.c, Makefile
src/hello.c
ÎļþÄÚÈÝÈçÏ£º
hello.h:
void hello(char name[]);
main.c:
#include <stdio.h>
#include "../inc/hello.h"
// The second hello.h should in ""
int main()
{
hello("GCC");
printf("Haha Linux Ubuntu!\n");
return 0;
}
ÆäÖУ¬µÚ¶þ¸ö°üº¬Îļþ£¬hello.h£¬±ØÐëÒªÓÃ""£¬Èç¹ûÓÃ<>ÔògccÖ»»áµ½ÏµÍ³Ä¿Â¼ÏÂÈ¥ËÑË÷£¬²»»áµ½±¾µ±Ç°Ä¿Â¼ÏÂËÑË÷
¾ÍÊÇ""ÔÚÓû§Ä¿Â¼Ï£¬<>ÔÚϵͳĿ¼Ï£¬Õâ¸öÔÚwindowsÉϲ»Ñϸñ£¬ ÔÚlinuxÀïËƺõºÜÑϸñ
Makefile°æ±¾1:
# String declaration
objects = main.o hello.o
# Command
app : $(objects)
cc -o app $(objects)
main.o : main.c hello.h
cc -c main.c
hello.o : hello.c stdio.h
cc -c ../src/hello.c
# Search paths
vpath %.h /usr/include ../inc
vpath %.c ../src
# Clean the intermediate files
.PHONY : clean
clean :
rm app $(objects)
òËÆvpathÖ»¶Ô %.o : ºóÃæµÄÓÐÓ°Ï죬ÏÂÃæµÄcc -cûÓÐ×÷ÓÃ
**************************
ȷʵÊÇÕâÑùµÄ£¬
%.o : %.c %.h£¬Õâ¾ä»°ÊÇmakeµÄÓï¾ä£¬¶øÏÂÃæµÄ
cc -c %.c£¬Õâ¾ä»°ÊÇgccµÄÓï¾ä£¬
¶øvpathºÍVPATHÉ趨µÄÊÇmakeµÄËÑË÷·¾¶£¬¶ÔgccµÄËÑË÷·¾¶Ã»ÓÐÓ°Ïì¡£
gccÉèÖÃËÑË÷·¾¶Îª£º
cc -c main.c -Iinclude
**************************
Makefile°æ±¾2£º
# String declaration
objects = main.o hello.o
# Command
app : $(objects)
cc -o app $(objects)
main.o : main.c hello.h
cc -c main.c
hello.o : ../src/hello.c stdio.h
cc -c ../src/hello.c
# Search paths
vpath %.h /usr/include ../inc
#vpath %.c ../src
# Clean the intermediate files
.PHONY : clean
clean :
rm app $(objects)

hello.c:
#include <stdio.h>
void hello(char name[])
{
printf("Hello %s!\n", name);
}


Ïà¹ØÎĵµ£º

¹ØÓÚlinuxµÄ¼¸¸öÔ¶³Ì¿ØÖƵÄÈí¼þ

putty
puttyÊǸö±È½Ï¼òµ¥µÄlinuxÔ¶³Ì¿ØÖƹ¤¾ß£¬Ãâ·ÑµÄ£¬Ö»ÒªÏµ½puttyÔËÐоÍokÀ²£¬ÊäÈëÒª·ÃÎʵķþÎñÆ÷µÄip £¬°Ñ·ÃÎÊÀàÐÍÉèΪssh£¬ÊäÈëµÇ½ÕÊ»§¡¢ÃÜÂë¾ÍokÀ²£¬Ò»Çж¼ÊÇÄÇôµÄ¼òµ¥¡£ 
secureCRT
Õâ¸ö±È½Ï¸´ÔÓÒ»µã£¬ÐèҪע²áÂëµÄ£¬µ«»¹ËãÊDZȽÏÈÝÒ×ÕÒµ½µÄ£¬ËüµÄÉèÖÃÒ²ÊǺÜɵ¹ÏµÄÄÇÖÖ£¬¸úputtyÊÇÒ»ÑùµÄ£¬°Ñ·ÃÎʵÄÀàÐÍÉè ......

linux²éÕÒ×î½üÐ޸ĵÄÎļþ ²¢Ö»ÄóöÎļþÃû

ÔÚ·þÎñÆ÷ÉÏд²¿ÊðÏîÄ¿µÄ½Å±¾ ,ÐèÒª°ÑÉÏ´«À´µÄ×îеÄÏîÄ¿½âѹ, ²¿Êð ,Æô¶¯·þÎñ ʵÏÖ×Ô¶¯»¯
ÓÚÊÇÕÒµ½×îеÄÎļþÊǵÚÒ»¼þÊÂÇé
¾ÍµÃµ½ÁËÒÔϽű¾
$ ls -lrt | awk '/xmhi/ { f=$NF };END{ print f }'
ÖмäµÄxmhiÊÇÎļþËù°üº¬µÄ×Ö·û´®
ÁíÍâÈç¹ûÒªls³öËùÓеÄÎļþÃû
$ ls -l |awk '{print$9}' ......

LinuxÈí¼þ°²×°ÓëжÔØ

LinuxÏÂÈí¼þµÄ°²×°ÓëжÔØ
Ò»¡¢¶þ½øÖÆ·Ö·¢Èí¼þ°üµÄ°²×°ÓëжÔØ
LinuxÈí¼þµÄ¶þ½øÖÆ·Ö·¢ÊÇÖ¸ÊÂÏÈÒѾ­±àÒëºÃ¶þ½øÖÆÐÎʽµÄÈí¼þ°üµÄ·¢²¼ÐÎʽ£¬ÆäÓŵãÊÇ°²×°Ê¹ÓÃÈÝÒ×£¬È±µãÔòÊÇȱ·¦Áé»îÐÔ£¬Èç¹û¸ÃÈí¼þ°üÊÇΪÌض¨µÄÓ²¼þ/²Ù×÷ϵͳƽ̨±àÒëµÄ£¬ÄÇËü¾Í²»ÄÜÔÚÁíÍâµÄƽ̨»ò»·¾³ÏÂÕýÈ·Ö´ÐС£
1¡¢*.rpmÐÎʽµÄ¶þ½øÖÆÈí¼þ°ü
°²×°£ºrpm ......

linux 2.6µÄKernel LOGO ÏÔʾµ÷Õû

2.6µÄKernel LOGO
Ëƺõ±È2.4ÈÝÒס£2.6µÄlogoÊý¾ÝÔÚ/drivers/video/logoÀppmÎļþ¾ÍÊÇlogoͼÏñÁË¡£Ã¿¸öppm¶ÔÓ¦Ò»¸ö. cÎļþ£¬ÄÚÈÝ´ó¸Å¾ÍÊÇͼÏñ³ß´ç¡¢µ÷É«°å¡¢Î»Í¼Êý¾ÝµÈÐÅÏ¢¡£.cÎļþÎÞÐè×Ô¼º½¨Á¢£¬ÔÚmakeµÄʱºòÈç¹û²»´æÔÚij¸öppmÎļþ¶ÔÓ¦µÄ.cÎļþ£¬¾Í»á×Ô¶¯´Ó ppmÉú³ÉÒ»¸ö£¬È»ºó°ÑËü±àÒë³É.oÎļþ¡£ËùÒÔ¿´¿´Ä¿Â¼ÏÂÄÄЩ.ppmÎ ......

linuxÇý¶¯Ö®makefileÏê½â

# If KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
    obj-m := hello.o
# Otherwise we were called directly from the command
# line; invoke the kernel build system.
else
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ