- 博客(12)
- 收藏
- 关注
原创 关于makefile中的参数
man gcc... -I dir Add the directory dir to the list of directories to be searched for header files. ... -Ldir Add directory dir to the
2011-07-21 17:57:14 540
原创 makefile(四)
make的"模式"一般是至少含有一个"%"的,所以,我们可以以如下方式给所有以[.o]结尾的目标定义目标变量:%.o :CFLAGS = -0使用条件判断libs_for_gcc = -lgnunormal_libs = foo:$(objects)ifeq ($(CC),gcc
2011-07-20 15:51:09 274
原创 makefile(三)
关于多行变量的定义,我们用define指示符,在define指示符前,也同样可以使用override指示符,如:override define foobarendif还有一种设置变量值的使用define关键字.使用define关键字设置变量的值可以有换行,这有利于定义一系列的命令
2011-07-20 12:20:14 292
原创 关于makefile(2)
忽略命令的出错,我们可以在Makefile的命令行前加一个减号"-"(在TAB键之后),标记为不管命令出错还是不出错都认为是成功的.如:clean: -rm -f *.o一 变量的基础变量在声明时需要给予初值,而在使用时,需要给在变量名前加上"$"符号,但最好用小括号"()"
2011-07-20 11:12:59 348
原创 makefile的规则
1.makefile必须中的命令必须以tab键开头规则告诉make两件事,文件的依赖关系和如何生成目标文件一般来说,make会以unix的标准shell,也就是/bin/sh来执行命令通配符的使用:波浪号("~")字符在文件名中也有比较特殊的用途,如果是"~/test",这就表示
2011-07-19 19:53:39 454
原创 对url格式化
/* normalize a file name : also called by robots.txt parser * return true if it is ok, false otherwise (cgi-bin) */ bool fileNormalize (ch
2011-07-19 10:50:22 955
原创 hash函数
static uint siteHashCode (char *host) { uint h=0; uint i=0; while (host[i] != 0) { h = 37*h + host[i]; i++; } return h % name
2011-07-19 09:32:06 269
原创 把一个十六制的字符串转化为整形
static int int_of_hexa (char c) { if (c >= '0' && c <= '9') return (c - '0'); else if (c >= 'a' && c <= 'f') return (c - 'a' + 1
2011-07-19 09:12:05 396
原创 larbin中hash函数
/* small functions used later */ static uint siteHashCode (char *host) { uint h=0; uint i=0; while (host[i] != 0) { h = 37*h + host[i
2011-07-19 09:00:00 340
原创 larbin中的TCP连接
// Larbin // Sebastien Ailleret // 07-03-00 -> 07-03-00 #include #include #include #include #include #include #include #include #in
2011-07-18 23:04:08 393
原创 larbin中write的用法
// Larbin // Sebastien Ailleret // 15-11-99 -> 03-05-01 #include #include #include #include #include #include #include #include #in
2011-07-18 21:36:20 351
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人