博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

斯诺随笔 snowman Gossip

当追求自由 无所谓恐惧 执著成就梦想
  zhuzimin.cublog.cn

关于作者
姓名:zzm
职业:打工一族
年龄:不到100岁
位置:东北的东北方向
个性介绍:
--^--相由心生--^--
|| << >> ||
我的分类


C compiler and makefile

cc -- C compiler

  Syntax

  ======

  cc [options]... file... [options]... file...

 

  Description

  ===========

  The cc(CP) command is the interface to the C compilation system. It examines

  the options and filename suffixes of its file arguments, then executes the

  proper compiler passes with appropriate options and arguments. The default

  filename of the resulting executable is a.out, which can be changed through

  option -o.

  example: 

             cc  –c  file.c    (file.o)

cc  file1.c  –o  outfile

cc  outfile1.o  outfile2.o  –o  outfile

make

  make -- maintain, update, and regenerate groups of programs

  make++- maintain, update, and regenerate groups of programs

 

  Syntax

  ======

  make [-f makefile] [-eiknpPqrstuw] [-b | -B] [names] [macro definitions]

 

  Description

  ===========

  make allows the programmer to maintain, update, and regenerate groups of

  computer programs.

  -f makefile

          Description file name. makefile is assumed to be the name of a

          description file.

 

===[make.sco]===

DEBUG  = -g  -DDEBUG

PGM_INC = ../../include

SRCS = rmtctl.c rmtlib.c publib.c catchsig.c getlsd.c

OBJS = $(SRCS:.c=.o)

LOADER = cc

PROG = rmtctl

PGM_SCO = -L../../lib/sco

PGM_LIB = -lshm -lipc

SYS_SCO = -lsocket -lm

PGM_BIN = ../../exe

 

CFLAGS = $(DEBUG) -I$(PGM_INC) -DSCO_UNIX

sco :$(OBJS)

       $(LOADER) -o $(PROG) $(OBJS) $(PGM_SCO) $(PGM_LIB) $(SYS_SCO)

       chmod 755 $(PROG)

       mv $(PROG) $(PGM_BIN)/$(PROG)

 

MakeFile:

     make –f make.sco sco

发表于: 2007-04-15,修改于: 2007-04-15 12:45,已浏览595次,有评论0条 推荐 投诉


网友评论
 发表评论