3 058b0118 2005-01-03 devnull 9c, 9a, 9l, 9ar \- C compiler, assembler, linker, archiver
4 058b0118 2005-01-03 devnull .SH SYNOPSIS
16 058b0118 2005-01-03 devnull .I target
18 058b0118 2005-01-03 devnull .I object
21 058b0118 2005-01-03 devnull .I library
25 058b0118 2005-01-03 devnull .BI -L path
29 058b0118 2005-01-03 devnull .BI -l library
36 058b0118 2005-01-03 devnull .I posname
43 058b0118 2005-01-03 devnull .SH DESCRIPTION
44 058b0118 2005-01-03 devnull These programs are shell scripts that invoke the appropriate standard tools
45 058b0118 2005-01-03 devnull for the current operating system and architecture.
46 058b0118 2005-01-03 devnull One can use them to write portable recipes for mkfiles.
49 058b0118 2005-01-03 devnull compiles the named C
51 058b0118 2005-01-03 devnull into object files for the current system.
52 058b0118 2005-01-03 devnull The system C compiler is invoked with warnings enabled,
53 058b0118 2005-01-03 devnull with the symbol
54 058b0118 2005-01-03 devnull .B PLAN9PORT
55 058b0118 2005-01-03 devnull is defined in the C preprocessor, and with
56 058b0118 2005-01-03 devnull .B $PLAN9/include
57 058b0118 2005-01-03 devnull on the include path.
60 058b0118 2005-01-03 devnull also defines
61 058b0118 2005-01-03 devnull .B __sun__
62 058b0118 2005-01-03 devnull on SunOS systems and
63 058b0118 2005-01-03 devnull .B __Linux26__
64 058b0118 2005-01-03 devnull on Linux systems with 2.6-series kernels.
67 058b0118 2005-01-03 devnull assembles the named files into object files for the current system.
68 058b0118 2005-01-03 devnull Unlike some system assemblers, it does
70 058b0118 2005-01-03 devnull promise to run the C preprocessor on the source files.
73 058b0118 2005-01-03 devnull links the named object files and libraries to create the target executable.
76 058b0118 2005-01-03 devnull option specifies that a library named
77 058b0118 2005-01-03 devnull .BI lib library .a
78 058b0118 2005-01-03 devnull be found and linked.
81 058b0118 2005-01-03 devnull option adds directories to the library search path.
83 058b0118 2005-01-03 devnull invokes the system linker with
84 058b0118 2005-01-03 devnull .B $PLAN9/lib
85 058b0118 2005-01-03 devnull already on the library search path.
88 058b0118 2005-01-03 devnull maintains object file archives called libraries.
89 058b0118 2005-01-03 devnull The exact set of valid command keys varies from system to system,
92 058b0118 2005-01-03 devnull always provides the following key characters:
97 058b0118 2005-01-03 devnull from the archive file.
101 058b0118 2005-01-03 devnull .I files
102 058b0118 2005-01-03 devnull in the archive file, or add them if missing.
105 058b0118 2005-01-03 devnull List a table of contents of the archive.
106 058b0118 2005-01-03 devnull If names are given, only those files are listed.
109 058b0118 2005-01-03 devnull Extract the named files.
110 058b0118 2005-01-03 devnull If no names are given, all files in the archive are
111 058b0118 2005-01-03 devnull extracted.
112 058b0118 2005-01-03 devnull In neither case does
114 058b0118 2005-01-03 devnull alter the archive file.
117 058b0118 2005-01-03 devnull Verbose.
118 058b0118 2005-01-03 devnull Give a file-by-file
119 058b0118 2005-01-03 devnull description of the making of a
120 058b0118 2005-01-03 devnull new archive file from the old archive and the constituent files.
123 058b0118 2005-01-03 devnull give a long listing of all information about the files,
124 058b0118 2005-01-03 devnull somewhat like a listing by
125 058b0118 2005-01-03 devnull .IR ls (1),
131 058b0118 2005-01-03 devnull mode uid/gid size date name
135 058b0118 2005-01-03 devnull Normally
137 058b0118 2005-01-03 devnull will create a new archive when
138 058b0118 2005-01-03 devnull .I afile
139 058b0118 2005-01-03 devnull does not exist, and give a warning.
142 058b0118 2005-01-03 devnull discards any old contents and suppresses the warning.
151 058b0118 2005-01-03 devnull is specified,
153 058b0118 2005-01-03 devnull inserts a table of contents, required by the linker, at
154 058b0118 2005-01-03 devnull the front of the library.
155 058b0118 2005-01-03 devnull The table of contents is
156 058b0118 2005-01-03 devnull rebuilt whenever the archive is modified.
157 058b0118 2005-01-03 devnull .SH EXAMPLE
160 058b0118 2005-01-03 devnull 9c file1.c file2.c file3.c
161 058b0118 2005-01-03 devnull Compile three C source files.
164 058b0118 2005-01-03 devnull 9a file4.s
165 058b0118 2005-01-03 devnull Assemble one assembler source file.
168 058b0118 2005-01-03 devnull 9ar rvc lib.a file[12].o
169 058b0118 2005-01-03 devnull Archive the first two object files into a library.
171 058b0118 2005-01-03 devnull 9l -o prog file3.o file4.o lib.a
172 058b0118 2005-01-03 devnull Link the final two object files and any necessary objects from the library
173 058b0118 2005-01-03 devnull into an executable.
174 058b0118 2005-01-03 devnull .SH SOURCE
175 058b0118 2005-01-03 devnull .B /usr/local/plan9/bin