高级UNIX编程 的源文件使用
2012-04-11 19:29
260 查看
1>从官网下载
http://basepath.com/aup/download.htm
这是下载链接
2>怎么编译源文件
http://basepath.com/aup/compile.htm
大意就是要下一个 awk的文件保存在 你下载的aup2ex中 运行这个文件,用于修改Makefile 中的 /aup/common之类名字
每个 Makefile 中都有说明
2 # with commands like
3 #
4 # $ AUPSRC=/aup # (for example)
5 # $ export AUPSRC
6 # $ awk -f $AUPSRC/makebuild.awk $AUPSRC/c1/makebuild.spec >$AUPSRC/c1/Makefile
修改完后看看 当前的Makefile 中的路径有没有改变
# Use the shell-procedure makebuild to run awk. Then compile
12 # with a shell-procedure like this one for Linux:
13 #
14 # AUPSRC=/aup # (for example)
15 # OS=LINUX
16 # LIBS="-lncurses -lutil"
17 # TLIBS=-pthread
18 # export OS LIBS TLIBS
19 # make $2 -f $AUPSRC/$1/Makefile $3
这里的$1 $3 是上面export 中的变量的内容
我在运行中出现了不能找到 lncurses 于是将上面的 LIBS="-lncurses -lutil"改成 LIBS="-lutil" 它居然就好了,不知道去掉这个 有什么影响
这样就能生成执行文件了。
英文太差 搞了我很久
有几个疑问:
1> make $2 -f $AUPSRC/$1/Makefile $3 能这样使用$2 。但是echo $2并不能输出其中的值,我这里也感觉到了矛盾,echo $2 到底是什么意思呢?echo $LIBS 可以输出
-----OVER-------
http://basepath.com/aup/download.htm
这是下载链接
2>怎么编译源文件
http://basepath.com/aup/compile.htm
大意就是要下一个 awk的文件保存在 你下载的aup2ex中 运行这个文件,用于修改Makefile 中的 /aup/common之类名字
每个 Makefile 中都有说明
2 # with commands like
3 #
4 # $ AUPSRC=/aup # (for example)
5 # $ export AUPSRC
6 # $ awk -f $AUPSRC/makebuild.awk $AUPSRC/c1/makebuild.spec >$AUPSRC/c1/Makefile
修改完后看看 当前的Makefile 中的路径有没有改变
# Use the shell-procedure makebuild to run awk. Then compile
12 # with a shell-procedure like this one for Linux:
13 #
14 # AUPSRC=/aup # (for example)
15 # OS=LINUX
16 # LIBS="-lncurses -lutil"
17 # TLIBS=-pthread
18 # export OS LIBS TLIBS
19 # make $2 -f $AUPSRC/$1/Makefile $3
这里的$1 $3 是上面export 中的变量的内容
我在运行中出现了不能找到 lncurses 于是将上面的 LIBS="-lncurses -lutil"改成 LIBS="-lutil" 它居然就好了,不知道去掉这个 有什么影响
这样就能生成执行文件了。
英文太差 搞了我很久
有几个疑问:
1> make $2 -f $AUPSRC/$1/Makefile $3 能这样使用$2 。但是echo $2并不能输出其中的值,我这里也感觉到了矛盾,echo $2 到底是什么意思呢?echo $LIBS 可以输出
-----OVER-------
相关文章推荐
- Unix环境高级编程(二)文件和目录
- 使用pthread库进行多线程编程1 - UNIX环境高级编程第11章读书笔记
- UNIX环境高级编程学习之第三章文件IO-文件写操作
- UNIX环境高级编程复习——文件和目录(3)
- UNIX环境高级编程学习之第十五章进程间通信 - 系统V 共享内存使用(使用信号灯保护共享内存)
- Unix环境高级编程中头文件apue.h的问题
- unix环境高级编程-4.18-文件时间
- 【转】Unix环境高级程序设计入门----文件系统的相关编程(上)
- UNIX环境高级编程 第3章 文件I/O
- unix环境高级编程 apue.h文件
- UNIX环境高级编程-第4章- 文件和目录 - 三
- 使用pthread库进行多线程编程1 - UNIX环境高级编程第11章读书笔记
- UNIX环境高级编程(三)文件IO
- UNIX环境高级编程之第3章:文件I/O
- unix环境高级编程——文件i/o
- Unix环境高级程序设计入门----文件系统的相关编程(下)
- UNIX环境高级编程 apue.h头文件的配置
- unix环境高级编程中的例子-----递归降序遍历目录层次结构,并按文件类型计数
- UNIX环境高级编程--文件共享
- unix环境高级编程-文件IO