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()
{
hello("GCC");
printf("Haha Linux Ubuntu!\n");
return 0;
}
Makefile
# 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 hello.c
# Search paths
vpath %.h /usr/include ../inc
# Clean the intermediate files
.PHONY : clean
clean :
rm app $(objects)
Ïà¹ØÎĵµ£º
ÔÚÇ°ÃæµÄ×¼±¸¹¤×÷Íê³ÉÖ®ºó£¬ÏÈʵÑéһϣ¬Ì¸²»ÉÏÕæÕýµÄÒÆÖ² £¬ÒòΪ´úÂ붼ûÓиĵġ£
Ê×ÏÈÐ޸Ķ¥²ãµÄMakefile£¬ÐÞ¸ÄARCH,CROSS_COMPLIE±äÁ¿¡£
#ARCH ?= $(SUBARCH)
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
Ö´ÐÐmake smd ......
Ö÷Òª¿´ÁËLinuxÍêȫעÊÍÄDZ¾Ê飬ÖÕÓÚ×¼±¸¹¥¶ÁLinuxÄÚºËÔ´ÂëÁË£¬ÏÈ¿´Á˵ڶþÕŵÄ×ÜÌå¸ÅÄ¸Ð¾õ²Ù×÷ϵͳÓкܶණÎ÷»¹ÕæÊÇ´óͬСÒ죬¼ÇµÃucos¾ÍÊÇÓÐÒ»¸ö½Ð×ö¿ì±íµÄ¶«Î÷£¬ÀïÃæ×î¶à¿ÉÒÔ±íʾ64¸ö½ø³Ì£¬¶øÔç°æµÄLinux£¨0.11£©Ò²ÓÐÕâ¸öһ˵µÄ¶«Î÷¡£
ÔÚLinuxÖÐÒ²ÓÐÒ»¸öPCBÀ´±íʾÿ¸ö½ø³Ì£¬ÔÚÕâ¸ö½á¹¹ÌåÖУ¬ÓÐÖ¸ÏòÈÎÎñ´úÂëµÄÖ ......
putty
puttyÊǸö±È½Ï¼òµ¥µÄlinuxÔ¶³Ì¿ØÖƹ¤¾ß£¬Ãâ·ÑµÄ£¬Ö»ÒªÏµ½puttyÔËÐоÍokÀ²£¬ÊäÈëÒª·ÃÎʵķþÎñÆ÷µÄip £¬°Ñ·ÃÎÊÀàÐÍÉèΪssh£¬ÊäÈëµÇ½ÕÊ»§¡¢ÃÜÂë¾ÍokÀ²£¬Ò»Çж¼ÊÇÄÇôµÄ¼òµ¥¡£
secureCRT
Õâ¸ö±È½Ï¸´ÔÓÒ»µã£¬ÐèҪע²áÂëµÄ£¬µ«»¹ËãÊDZȽÏÈÝÒ×ÕÒµ½µÄ£¬ËüµÄÉèÖÃÒ²ÊǺÜɵ¹ÏµÄÄÇÖÖ£¬¸úputtyÊÇÒ»ÑùµÄ£¬°Ñ·ÃÎʵÄÀàÐÍÉè ......
ʲôʱºòÐèÒª´´½¨Ï̳߳ØÄØ£¿¼òµ¥µÄ˵£¬Èç¹ûÒ»¸öÓ¦ÓÃÐèҪƵ·±µÄ´´½¨ºÍÏú»ÙỊ̈߳¬¶øÈÎÎñÖ´ÐеÄʱ¼äÓַdz£¶Ì£¬ÕâÑùÏ̴߳´½¨ºÍÏú»ÙµÄ´øÀ´µÄ¿ªÏú¾Í²»ÈݺöÊÓ£¬ÕâʱҲÊÇÏ̳߳ظóö³¡µÄ»ú»áÁË¡£Èç¹ûÏ̴߳´½¨ºÍÏú»Ùʱ¼äÏà±ÈÈÎÎñÖ´ÐÐʱ¼ä¿ÉÒÔºöÂÔ²»¼Æ£¬ÔòûÓбØҪʹÓÃÏ̳߳ØÁË¡£
ÏÂÃæÊÇ ......
ºÍ
WindowsϵͳһÑùLinuxÒ²Óо²Ì¬/¶¯Ì¬Á´½Ó¿â£¬ÏÂÃæ½éÉÜ´´½¨ºÍʹÓ÷½·¨£º
¼ÙÉèÓÐÏÂÃ漸¸öÎļþ£º
Í·ÎļþString.h£¬ÉùÃ÷Ïà¹Øº¯ÊýÔÐΣ¬ÄÚÈÝÈçÏ£º
Strlen.c£º
º¯ÊýStrlenµÄʵÏÖ£¬»ñÈ¡¸ø¶¨×Ö·û´®µÄ³¤¶È£¬ÄÚÈÝÈçÏ£º
Strlnen.c£ºº¯Êý
StrNlenµÄʵÏÖ£¬»ñÈ¡¸ø¶¨×Ö·û´®µÄ³¤¶È£¬Èç¹ûÊäÈë×Ö·û´®µÄ³¤¶È´óÓÚÖ¸¶¨µÄ×î´ó³¤¶È£¬Ô ......