home *** CD-ROM | disk | FTP | other *** search
- vc - frontend for vbcc (c) in 1995-97 by Volker Barthelmann
-
-
- INTRODUCTION
-
- vc calls the preprocessor, compiler, assembler and linker.
- It should be somewhat Unix cc compatible.
-
-
- LEGAL
-
- vc is (c) in 1995-97 by Volker Barthelmann. All code is written by me
- and may be freely redistributed as long as no modifications are made
- and nothing is charged for it.
-
-
- INSTALLATION
-
- This may change in following versions.
-
- First do not set your stack too low (if your operating systems needs
- specifying a stack size). I have not tested how much stack vbcc needs,
- some 10k will probably be enough.
-
- At the moment vc calls an external preprocessor, so this one must be
- in the path and you probably have to tell the preprocessor the
- directories that contain the vbcc includes (and any os includes, if you
- have them).
-
- vc needs a config file which tells it how to call all the translation
- phases (preprocessor, compiler, assembler, linker). The locations where
- vc searches for config files depend on how it was compiled.
- On the Amiga it will usually search for "vc.config" in the current
- directory, then in ENV: and VBCC:.
- On Unix it will search for vc.config in the current directory followed
- by /etc/vc.config.
- Those locations can be changed by modifying config_names in vc.c and
- rebuilding it.
-
- The following options can be used to tell vc how to call the translation
- phases (they will usually be contained in the config-file):
-
- -pp=string The preprocessor will be called like in
- printf(string,opts,infile,outfile), e.g. the default for vcpp
- searching the includes in vinclude: and defining __STDC__)
- is "-pp=vcpp -Ivinclude: -D__STDC__=1 %s %s %s"
-
- -cc=string For the compiler. Will be called like in
- printf(string,infile,outfile,options,optimization), e.g.
- "-cc=vbccm68k -quiet %s -o= %s %s -O=%d"
-
- -as=string The same for the assembler, E.g.:
- "-as=PhxAss opt NRQBTLPSM quiet %s to %s" or
- "-as=as %s -o %s"
-
- -rm=string This is the string for the delete command and takes only
- one argument, e.g.
- "-rm=delete quiet %s" or
- "-rm=rm %s"
-
- -ld=string This is for the linker and takes three arguments. The first
- one are the object files (separated by spaces), the second
- one the user specified libraries and the last one the name
- of the resulting executable.
- This has to link with proper startup-code and c-libraries,
- e.g.:
- "-ld=PhxLnk vlib:startup.o %s %s vlib:vc.lib vlib:amiga.lib
- to %s" or
- "-ld=ld /usr/lib/crt0.o %s %s -lc -o %s"
-
- -l2=string The same like -ld, but standard-startup and -libraries should
- not be linked; used when -nostdlib is specified.
-
- All those strings should tell the command to omit any output apart from
- error messages if possible. However for every of those options there
- exists one with an additional 'v', i.e. -ppv=, -asv=, etc. which should
- produce some output, if possible.
- If vc is invoked with the -vv option the verbose commands will be called,
- if not the quiet ones will be used.
-
- -ul=string Format for additional libraries specified with -l<lib>.
- The result of printf(string,lib) will be added to the
- command invoking the linker. Examples are:
- "-ul=vlib:%s.lib" or "-ul=-l%s"
-
- -ml=n If the linker line is longer than <n> characters the objects
- will be written to a temporary file and passed to the linker
- with @tmpfile. This will not work with all linkers.
-
-
- CONFIG
-
- vc looks for a config file named 'vc.config' in the current directory
- first and then in some other places which have been specified
- while compiling vc (on the Amiga this will be ENV:vc.config then
- VBCC:vc.config; on Unix systems /etc/vc.config). If it is found it will
- be treated as a collection of additional command line arguments. Every
- line of the file will be used as one argument. So no quoting shall be
- used and furthermore must each argument be placed on its own line.
- There should be an example vc.config.
-
- If one option '+file' is specified then <file> will be used as
- config-file (it will be searched in the same directories as the
- default config-files). Only the first such option will be used.
-
-
- USAGE
-
- vc [options] file1 file2 ...
-
- Processes all files according to their suffix and links all objects
- together (unless any of -E, -S, -c is specified). It recognizes the
- following file types:
-
- .c C source
- .i already preprocessed C source
- .asm
- .s assembler source
- .obj
- .o object file
-
- Usually pattern matching is supported - however this depends on the
- port and the host system.
-
- The options recognized by vc are:
-
- -v verbose; print all commands
-
- -vv very verbose; display some internals, aswell
-
- -Ox optimization level
- -O0 is equivalent to -O=0
- -O will activate some optimizations (at the moment -O=991)
- -O2 will activate most optimizations (at the moment -O=1023)
- -O3 will activate all optimizations (at the moment -O=~0)
-
- Higher values may or may not activate even more optimizations.
- The default is -O=1.
- It is also possible to specify an exact value with -O=n.
- However, I do not recommend this unless you know exactly what
- you are doing.
-
- -o file save target as file (default for executables is a.out)
-
- -E do not compile, save the preprocessed C sources with .i suffix
-
- -S do not assemble, save the compiled files with .asm suffix
-
- -c do not link, save the compiled files with .o suffix
-
- -k keep all intermediate files; by default all generated files
- except the source files and the targets are deleted
-
- -Dstr #define a preprocessor symbol, e.g. -DAMIGA or -DCPU=68000;
- at the moment this is passed through to the preprocessor
-
- -Ipath add path to the include-search-path;
- at the moment this is passed through to the preprocessor
-
- -lulib link with library ulib
-
- -+ allow C++ comments
-
- -nostdlib do not link with standard-startup/libraries; useful only
- for people who know what they are doing
-
- -notmpfile do not use names from tmpnam() for temporary files
-
- +file use file as config-file
-
-
- All other options are passed through to vbcc.
-
-
- Volker volker@vb.franken.de
-
-