Linux GCC make文件的写法1
所需文件hello.c, main.c, hello.h, Makefile,在同一个目录下
hello.c:
#include <stdio.h>
void hello(char name[])
{
printf("Hello %s!\n", name);
}
main.c:
#include "stdio.h"
#include "hello.h"
// The second
int main()
{
hello("GCC");
printf("Haha Linux Ubuntu!\n");
return 0;
}
hello.h:
void hello(char name[]);
Makefile(之所以用大写,因为make可以识别Makefile和makefile,用大写可以鲜明一些):
# String declaration
objects = main.o hello.o
# Command
app : $(objects)
cc -o app main.o hello.o
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
# Clean the intermediate files
.PHONY : clean
clean :
rm app $(objects)
相关文档:
【转】Linux内核裁剪的具体步骤
在menuconfig中配置:
详细介绍内核配置选项及删改情况
第一部分:全部删除
Code maturity level options ---> 代码成熟等级选项
[]Prompt for development and/or incomplete code/drivers 默认情况下是选择的,这将会在 ......
在前面的准备工作完成之后,先实验一下,谈不上真正的移植 ,因为代码都没有改的。
首先修改顶层的Makefile,修改ARCH,CROSS_COMPLIE变量。
#ARCH ?= $(SUBARCH)
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
执行make smd ......
putty
putty是个比较简单的linux远程控制工具,免费的,只要下到putty运行就ok啦,输入要访问的服务器的ip ,把访问类型设为ssh,输入登陆帐户、密码就ok啦,一切都是那么的简单。
secureCRT
这个比较复杂一点,需要注册码的,但还算是比较容易找到的,它的设置也是很傻瓜的那种,跟putty是一样的,把访问的类型设 ......
引:
Linux操作系统是由Linus Torvalds先生在1991年创建的,之后不断获得互联网上众多程序员的自愿支持,经过十几年的发展,如今已经成为继Windows之后的第二大电脑操作系统软件。
你是否对Linux有充分的了解呢?作为一种平台,Linux首先获得了沉溺于某种癖好之士和黑客们的
青睐。Linux操作系统是由Linus
Torvalds先生 ......
10.5.2 精通定时器设置
函数alarm设置的定时器只能精确到秒,而以下函数理论上可以精确到微妙:
#include <sys/select.h>
#include <sys/itimer.h>
int getitimer(int which, struct itimerval *value);
int setitimer(int which, const struct itimerval
*value, struct itimerval *ovalue ......