Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1240486
  • 博文数量: 124
  • 博客积分: 7074
  • 博客等级: 少将
  • 技术积分: 1336
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-15 16:37
文章分类
文章存档

2011年(3)

2010年(18)

2009年(8)

2008年(14)

2007年(81)

分类: C/C++

2007-04-15 12:45:45

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

阅读(1950) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~