分类: 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