3 9c, 9l, 9ar \- C compiler, assembler, linker, archiver
48 These programs are shell scripts that invoke the appropriate standard tools
49 for the current operating system and architecture.
50 One can use them to write portable recipes for mkfiles.
55 into object files for the current system.
56 The system C compiler is invoked with warnings enabled.
66 in the C preprocessor.
71 defined in the C preprocessor and adds
81 links the named object files and libraries to create the target executable.
84 option specifies that a library named
89 option adds directories to the library search path.
91 invokes the system linker with
93 already on the library search path.
96 searches the named objects and libraries for symbols of the form
97 .BI __p9l_autolib_ name \fR,
98 which it takes as indication that it should link
99 .BI $PLAN9/lib/lib name .a
101 It also examines such libraries to find their own dependencies.
104 option at the beginning of the command line disables this behavior.
106 .BI __p9l_autolib_ name
107 is added to an object file by the macro
108 .B AUTOLIB( name )\fR,
111 Header files associated with libraries contain
113 annotations; ordinary programs need not use them.
114 Due to shortcomings in the implementation, a source file may not
117 statement multiple times.
120 maintains object file archives called libraries.
121 The exact set of valid command keys varies from system to system,
124 always provides the following key characters:
129 from the archive file.
134 in the archive file, or add them if missing.
137 List a table of contents of the archive.
138 If names are given, only those files are listed.
141 Extract the named files.
142 If no names are given, all files in the archive are
146 alter the archive file.
151 description of the making of a
152 new archive file from the old archive and the constituent files.
155 give a long listing of all information about the files,
156 somewhat like a listing by
163 mode uid/gid size date name
169 will create a new archive when
171 does not exist, and give a warning.
174 discards any old contents and suppresses the warning.
185 inserts a table of contents, required by the linker, at
186 the front of the library.
187 The table of contents is
188 rebuilt whenever the archive is modified.
192 9c file1.c file2.c file3.c
193 Compile three C source files.
196 9ar rvc lib.a file[12].o
197 Archive the first two object files into a library.
200 9l -o prog file3.o file4.o lib.a
201 Link the final two object files and any necessary objects from the library