how to `make` the src code of APUE book

1 篇文章 0 订阅





Firstly, go to www.apuebook.com to get the src code package.

If you'd like to `make all` the code in a time, pls follows the Instruction 1.
If not, I also provide the alternative instruction for your customized code.

Instruction 1: `make all` code.
  1. Unpack the source package.
  2. Open <src_pkg_home>/Make.define.linux file, then set WKDIR to the pathname of the tree containing the source code.
  3. [hillmover@localhost src_pkg_home] $ vi Make.define.linux
    WORKDIR=...
  4. Open <src_pkg_home>/std/linux.mk file, then replace "nawk" with "awk".
  5. $ make
Instruction 2: compile and link your customize code.
  1. Unpack the source package.
  2. Open <src_pkg_home>/Make.define.linux file, then set WKDIR to the pathname of the tree containing the source code.
  3. Open <src_pkg_home>/Makefile, then set DIRS = lib.
  4. [hillmover@localhost src_pkg_home] $ make
  5. Now, you should find libapue.a file under the <src_pkg_home>/lib path.
  6. Customize code.
  7. For example, you can open <src_pkg_home>/file/ls1.c, then change the code as your personal requirements.
  8. Compile & Link your customized code
  9. [hillmover@localhost file] $ gcc -c -I ../include -o ls1.o ls1.c
    [hillmover@localhost file] $ gcc -o ls1 ls1.o ../lib/libapue.a
Note. APUE = Advanced Programming in the UNIX Environment.
    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

    当前余额3.43前往充值 >
    需支付:10.00
    成就一亿技术人!
    领取后你会自动成为博主和红包主的粉丝 规则
    hope_wisdom
    发出的红包
    实付
    使用余额支付
    点击重新获取
    扫码支付
    钱包余额 0

    抵扣说明:

    1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
    2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

    余额充值