Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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·þÎñÆ÷ÉÏÈçºÎ¿ªÆô°²È«µÄSNMP´úÀí

ÔÚ¸÷ÖÖLinux·Ö·¢°æÖУ¬´ó¶àÊý¶¼ÒѾ­Ä¬Èϼ¯³ÉÁËsnmpd£¬±ÈÈçÔÚsuse10ÖУ¬Äã¿ÉÒÔÕâÑù¿ªÆôsnmpd£º
¡¡¡¡
¡¡¡¡suse10:~ # /etc/init.d/snmpd start
¡¡¡¡
¡¡¡¡Èç¹ûûÓÐĬÈϰ²×°£¬ÄãÒª×öµÄ¾ÍÊÇ×Ô¼ºÀ´±àÒësnmpd£¬°´ÕÕϱߵIJ½Ö裬·Ç³£¼òµ¥¡£
¡¡¡¡
¡¡¡¡±àÒëºÍ°²×°
¡¡¡¡¶ÔÓÚLinuxƽ̨£¬ÎÒÃÇÍÆ¼öʹÓÃNet-SNMP£¬ËüʵÏÖÁ˱ê×¼µÄSNM ......

Linux 2.6.19.x Äں˱àÒëÅäÖÃÑ¡Ïî¼ò½é

Ô­Îijö´¦£ºhttp://www.svn8.com/shouce/Linux/kernel_options.html×ðÖØÔ­´´£¡
Code maturity level options
´úÂë³ÉÊì¶ÈÑ¡Ïî
Prompt for development and/or incomplete code/drivers ÏÔʾÉÐÔÚ¿ª·¢ÖлòÉÐδÍê³ÉµÄ´úÂëÓëÇý¶¯.³ý·ÇÄãÊDzâÊÔÈËÔ±»òÕß¿ª·¢Õß,·ñÔòÇëÎðÑ¡Ôñ
General setup
³£¹æÉèÖÃ
Local version - append ......

linuxϵͳʱ¼ä

  ·¢ÏÖ·þÎñÆ÷ϵͳʱ¼äºÍ±ê׼ʱ¼ä²îÁË10¶à·ÖÖÓ,È»ºóÁãµãµÄʱ¼äµ÷ÕûÁËÏÂʱ¼ä¡£¹ýÁ˲¶àÒ»¸öÀñ°Ý·¢Õ¹Êý¾Ý¿âÖмǼµÄʱ¼ä»¹ÊDz»¶Ô£¬ÈçÊÇÓüӰàµ÷ÕûÁËÏÂʱ¼ä¡£¹ýÁË2ÌìÒ»¿´»¹ÊÇʱ¼ä²»¶Ô£¬Ò»²é²Å·¢ÏÖ£º 
   »úÆ÷ÀïÓÐÁ½¸öʱÖÓ¡£Ó²¼þʱÖÓ´Ó¸ù±¾ÉϽ²ÊÇCMOSʱÖÓ£»¶øÏµÍ³Ê±ÖÓÊÇÓÉÄÚºËά»¤µÄ£¬ËüÊÇ´Ó1969ÄêÄ©£¨¼ ......

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

ÎļþÔÚÁ½¸öÎļþ¼Ð£º
inc/hello.h
main/hello.c, main.c, Makefile
ÎļþÄÚÈÝ£º
hello.h
void hello(char name[]);

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

main.c
#include <stdio.h>
#include "../inc/hello.h"
// The second
int main( ......

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ºÅ