autodep - Dependency Rule Generator for C/C++ Makefile
Version 1.1.1 (Aug 01,1998)
Copyright (c) 1997-98 By Kriang Lerdsuwanakij
email: lerdsuwa@scf.usc.edu
home page: http://www-scf.usc.edu/~lerdsuwa/util/

Important Notice
================

Licence for files in autodep base directory
-------------------------------------------

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


Licence for files in `templates' and `examples' and subdirectories
------------------------------------------------------------------
and files generated by autodep
------------------------------

	You can redistribute it and/or modify it without any restriction. 
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

	Some of the files comes with their own license, read to beginning
	of the file for more information.  Here is a list of them:

		examples/autoconf/install-sh


What Is autodep ?
=================
	autodep automates Makefile generation for C/C++ compilation and 
linking process.  Makefile are created by using a rule file `ad.rule' and 
several text files you specified.  autodep looks for all include files used
by your program to produce correct dependencies and rules in Makefile.  
Makefile can be regenerated as often as you want by reruning this program.  
It is designed to work with or without GNU Autoconf configuration script.


System Requirements
===================
	- UNIX environment
	- Perl 5  (autodep is only tested with Perl 5.004)


Documentation
=============
	During the course of program development/maintainance, you may have 
to add new source files to the project, includes more .h files in C or C++ 
files, etc.   Makefile has to be updated accordingly to reflect changes.   
This is a non-trivial task.  autodep helps you by analyzing your C/C++ source 
files for all #include preprocessor and create rules for your Makefile.

	Typically, you want Makefile to contains more than just compiling and 
linking programs.  For example, `install' and `clean' targets become standard
in almost every package.  You can provide your own `install' and `clean' 
target to autodep and let autodep combines them with generated rules to 
produce a complete Makefile.

	To work with autodep, you have to write the file `ad.rule'.  This
file contains all information needed to build all rules for compilation and
linking.  By default, output is directed to `Makefile.ad'.  (The name 
`Makefile.ad' is used so that you won't accidentally overwrite your old 
`Makefile' or `Makefile.in'.)   In this file, the content of `ad.prepend' 
appears first, followed by generated rules and, finally, content of 
`ad.append'.


       ad.prepend -----------------------+
   (can be overrided)                    |
                 ....................... | ....
                 :                       |    :
                 :           autodep     |    :
                 :                       V    :
       ad.rule ----> generated rules --->O--------> Makefile / Makefile.in
                 :                       ^    :         / Makefile.ad
                 ....................... | ....       (can be overrided)
                                         |
       ad.append ------------------------+
   (can be overrided)


	Fig 1: Diagram illustrating makefile creation process.


Structure of ad.rule
====================
	`ad.rule' consists of two parts.  The first part is optional and 
may contain one or more of the following commands:

	APPEND, CURDIR, DEBUG, DEFTARGET, DEFTARGETLIST, EXCLUDE, OUTPUT, 
	PREPEND, SUBDIR

Note:	Additional commands may be made available by various modules.  
INCLUDEPATH, for example, is added by C/C++ modules.  If you install
additional modules (from third party) to support, say Fortran language, 
some new commands may appear.

	The second part is again optional.  Typically, it consists of one or 
more `TARGET' or `TYPE' commands together with list of source files used by 
these targets.  We do not use TYPE or TARGET command if the duty of Makefile 
in current directory is just calling all Makefile's in subdirectories.

	The `END' command (optional) may be used to indicate end of 
processing for this `ad.rule'.

	All command must not start with any spaces or tabs.  Indented lines 
are treated as a source file for the current target (see next section for 
details).  Command names are case-insensitive.

	If a command is too long, you can use `\' at the end of line to 
indicate that the command will continue the next line.  Make sure you don't 
have any space or tabs after the `\'.  For example, the command

		APPEND file1 file2 file3 file4

can be writen as

		APPEND file1 file2 \
		       file3 file4

Note that although the second line is indented, it is actually part of the 
APPEND command which is not indented.  So it is not interpreted as a
source file.

	Comments may appear anywhere in `ad.rule'.  They start at `#' and 
continue till the end of line (unless there is a `\' at the end of the line).
Caution:  The following commands are not equivalent!

		APPEND file1 file2 file3 file4	# comment

		APPEND file1 file2 # comment \
		       file3 file4

In the second command, file3 and file4 are part of comment.


Tutorial
========
	It is easiest to learn autodep commands from examples.   There are 
two examples provided.  One is for project without Autoconf, the other is 
for project with Autoconf.   Important commands are explained in these 
examples.  For discussion of other, seldom used commands, see the 
`Other Capabilities' section.


Tutorial 1: Project without Autoconf
====================================
	Example files are in the directory `examples/simple'.  Their contents
are listed here for convenience (with some comments removed).

----------------------- Content of `func.h' ------------------------------

#include <stdio.h>

void	Func1();

----------------------- Content of `func.c' ------------------------------

#include "func.h"

void	Func1()
{
	printf("Func1() called.\n");
}

----------------------- Content of `main.c' ------------------------------

#include "func.h"

int	main()
{
	printf("autodep test program\n");
	Func1();
	return 0;
}

----------------------- Content of `ad.rule' -----------------------------

OUTPUT	Makefile			# Output directly to Makefile
PREPEND	templates/prepend-gcc		# Use standard files for prepend
					#	portion of Makefile
APPEND	templates/append-gcc		# Same as above but for append part

TARGET	testrun				# Executable name is `testrun'
					# Language is C by default
	main.c				# Source file, must be indented
	func.c				# Source file, must be indented

--------------------------------------------------------------------------

	Source and header files are straigh forward and should be understood 
by C programmers.  So let's focus on `ad.rule':

	1 The most important command here is the TARGET command.  The 
	  `testrun' here is the name of executable.  It is created by
	  compiling `main.c' and `func.c' and linking them together.
	  We see that source files must by indented (using any number of
	  spaces and tabs you want) in `ad.rule'.

	  In this case, C-style linking is assumed.  These commands are
	  equivalent:

			TARGET	testrun		# C is assumed.
			TARGET	testrun	C	# C is explicitly specified.
			target testrun c	# `TARGET' is case-insensitive
						#
						# Using `c' instead of `C'
						# almost always works unless
						# someone add a new target 
						# type and name it as `c'.
						#
						# Any number of spaces and
						# tabs can be used to
						# separate parameters.

	  But the following is not!

			TARGET	TestRun		# Build `TestRun' instead of
						# `testrun',  filenames are
						# case-sensitive.

	2 The PREPEND command override autodep default value.  Here,
	  the file `templates/prepend-gcc' is used inst instead of
	  `ad.prepend', the default name.  This command works because 
	  autodep also search for files in autodep data directory (ususally 
	  named `/usr/local/share/autodep'.)

	  In the file `prepend-gcc', variables such as $(CC),
	  $(CFLAGS), etc. are defined.

	  Alternately you may copy `/usr/local/share/autodep/template/
	  prepend-gcc' to this directory (`example/simple') and rename to 
	  `ad.prepend' and customize it.  The PREPEND command can now be 
	  removed since the file is now `ad.prepend', the default filename.  

	  You should not put any rule in this file.  Put them in the append
	  portion instead.  (This is to ensure that simply type `make' means
	  `make all'.  Recall that the first rule in Makefile is the default 
	  rule.  The `all' target generated by autodep appears after the 
	  prepend part.)

	3 The APPEND command is similar to PREPEND command.  It is the place 
	  where rules not handled by autodep are defined.  Here it contains 
	  `clean' and `distclean' rules.

	  Alternately you may copy `../../template/append-gcc' to this
	  directory and rename to `ad.append' and customize it.  The APPEND 
	  command can now be removed since the file is now `ad.append', the 
	  default filename.

	4 The OUTPUT command specify that output is to be writen to 
	  `Makefile'.

	Let's generate Makefile now by typing `autodep'.  `Makefile' should 
appear in the current directory if nothing is wrong.  (You may view the 
Makefile now if you want.)  If there is an error, autodep is not properly 
installed.

	Next, try creating executable file by typing `make'.  You should see 
`testrun' in current directory.  Try `make clean' will delete all object and 
executable files created.  Typing `make distclean' does the same thing.

	Now, let's create a new file `func2.c' as follows:

----------------------- Content of `func2.c' -----------------------------

#include "func.h"

void	Func2()			/* Our new function */
{
	printf("Func2() called.\n");
	Func1();
}

--------------------------------------------------------------------------

Then we modify `main.c' to add a declaration and a call to Func2().  We also 
have to add a new source to `ad.rule':

----------------- Content of the modified `main.c' -----------------------

#include "func.h"

void	Func2();		/* Add this ! */

int	main()
{
	printf("autodep test program\n");
	Func1();
	Func2();		/* Add this ! */
	return 0;
}

----------------- Content of the modified `ad.rule' ----------------------

OUTPUT	Makefile			# Output directly to Makefile
PREPEND	templates/prepend-gcc		# Use standard files for prepend
					#	portion of Makefile
APPEND	templates/append-gcc		# Same as above but for append part

TARGET	testrun				# Executable name is `testrun'
					# Language is C by default
	main.c				# Source file, must be indented
	func.c				# Source file, must be indented
	func2.c				# Add this !

--------------------------------------------------------------------------

	Now, try `autodep' and `make' again.  We see that compilation and 
linking process are now updated to reflect changes.


Tutorial 2: Project with Autoconf
=================================
	This example is intended for users working with Autoconf only.  
If you haven't use Autoconf before,  please skip this section.  Knowledge 
of Autoconf is assumed throughout this example.

	Example files are in the directory `examples/autoconf'.  Only 
`ad.rule' are listed here (with some comments removed).

----------------------- Content of `ad.rule' -----------------------------

OUTPUT	Makefile.in			# Output to Makefile.in

PREPEND	templates/prepend-autoconf	# Use standard files for prepend
					#	portion of Makefile.in

APPEND	templates/append-autoconf	# Same as above but for append part

CURDIR	config.h			# config.h will be created in current
					# directory by configure script

TARGET	testrun	C++			# Executable name is `testrun'
					# Build using C++-style linkage
	main.cc				# Source file, must be indented
	func.cc				# Source file, must be indented

--------------------------------------------------------------------------

	We notice the following differences between this example and the 
former one:

	1 Now we use C++ style linking, i.e. calling `g++' instead of `gcc'. 
	  So the TARGET command must be specified with `C++' parameter.

	2 We use the Autoconf version of prepend.  It contains command like

		CC	= @CC@

	  waiting to be substituted by configure script.

	3 We also use Autoconf version of append.  The `distclean' target 
	  also delete files generated by configure.

	4 Output file is `Makefile.in'.

	5 CURDIR command is used.  Since `config.h' is to be created by
	  configure,  it may not exist when autodep is run.  This command 
	  forces autodep to add this file to generated rule whenever the
	  following commands are found inside your source files:

		#include <config.h>
	  or	#include "config.h"

	  There is another important change to dependency rule when CURDIR 
	  is used - affected files are not prefixed by `$(srcdir)/'.  Here 
	  is what autodep produce:

	  main.o : Makefile $(srcdir)/main.cc config.h $(srcdir)/func.h 

	  `config.h' is not prefixed by `$(srcdir)/' since configure will 
	  generate it in current directory, not the directory containing 
	  sources.  `func.h' is a normal include file so it is prefixed.
	  (`main.cc' also includes `stdio.h' but it does not appear here 
	  as it is not exist in source directory and CURDIR is not used.)


	Type `autodep' now to generate `Makefile.in'.  Then run `configure' 
to create `Makefile'.   Next, let's build the executable file, `testrun', by 
typing `make'.  You should see `testrun' in current directory.  Try 
`make clean' will delete all object and executable files created.  Typing 
`make distclean' deletes `Makefile' and various files created by configure.


                                              .
                                              .
      ../templates/prepend-autoconf -+        .
                                     |        .
                                     V        .                  config.h.in
                               +-----------+  .                       |
                 ad.rule ----->|  autodep  |---------> Makefile.in    |
                               +-----------+  .             |         |
                                     ^        .             |         |
                                     |        .             |         |
      ../templates/append-autoconf --+        .             V         V
                                              .           +-------------+
                                              .   +-------|  configure  |
                                              .   |       +-------------+
           autodep run by program developer   .   |         |         |
    ...........................................   |         |         |
           configure run by user during           |         |         |
           program installation                   |         V         |
                                                  |      Makefile     |
                                                  V                   V
                                            config.status          config.h


	Fig 2: Diagram illustrating autodep / configure interaction
	       when config.status is not present


	Once you have already run configure,  regenerating `Makefile' and 
`config.h' from `Makefile.in' and `config.h.in' is faster by running 
`config.status' instead of `configure'.  It bypass all check.  So if autodep 
find `config.status', it run the program immediately after Makefile.in is 
created.  Running configure manually is only needed when you change 
`configure.in' later.


Other Capabilities
==================

	Predefined Variables
	--------------------

		adEXECS 	Set to all executable files to be built.

		adOBJS 		Set to all object files to be built.

		adLIBS		Set to all library files to be built.  It
				is only defined when there are library 
				targets in ad.rule.

		adINTFILES	Intermediate files used to create targets.
				They are mostly object files.

		adOUTFILES	All output files, this includes adEXECS and
				adLIBS.

		adDIRS 		Set to all directories specified in SUBDIR 
				command.

		adTESTS_MAKESUBDIR	Intended to be used as dependency 
					for `all' target to ensure that all 
					executable, including ones in 
					subdirectories as specified by SUBDIR, 
					is properly compiled and linked.   
					It works in current directory first
					before working in subdirectories.

		adMAKESUBDIR_TESTS	Like adTESTS_MAKESUBDIR but works
					in subdirectories first.

		adTESTS		Same as adTESTS_MAKESUBDIR but affect files
				in current directory only.

		adBeginSubdir and adEndSubdir
				Set to shell commands to repeatly call make 
				for all directory in SUBDIR.

				For example, if you wish to call `make clean' 
				for all such directory, use the following 
				command in your rule:

					$(adBeginSubdir) clean $(adEndSubdir)

				which will be expanded into:

				test -z "$(adDIRS)" ||    \
				for d in $(adDIRS) ; do \
				  (cd $$d; $(MAKE) clean );   \
				done

	Predefined Rules
	----------------

		all		By default, the rule for this target is

				all : $(adTESTS_MAKESUBDIR)

				It can be overrided using DEFTARGET and 
				DEFTARGETLIST command.

		adMakeSubdir	Repeatly run `make' for each SUBDIR 
				directory.  It looks like this in Makefile:

				adMakeSubdir:
					$(adBeginSubdir) $(adEndSubdir)

	Note: adALLCAPS style capitalization indicates ordinary variables 
	      while adBeginCaps type indicates variables or rules that act 
	      like macros or commands.


	Overriding Default Target
	-------------------------
		The `all' target is always the first rule generated by 
	autodep.   Its default behavior is to compile, link all target and 
	repeatly call `make all' in each directory appeared in SUBDIR 
	command and do nothing else.  It looks like this in Makefile:

			all : $(adTESTS_MAKESUBDIR)

	The DEFTARGET command provides a way to change `all' while 
	DEFTARGETLIST works with `$(adTESTS_MAKESUBDIR)'.

		If you want to change the meaning of `make' to mean 
	something other than `make all', say `make install', use the 
	following commands in ad.rule

			DEFTARGET	install
			DEFTARGETLIST	my_install

	and provide your own `my_install' and `all' targets in append file.
	Makefile now becomes

				.
				.
				.
						# The first target appears 
						#  here

			install : my_install	# default target is now
						#  `install'

				.
				.
				.

						# contents from ad.append 
						#  starts here

			my_install : adMakeSubdir
				your install commands here ...


			all : $(adTESTS)	# Your own `all' target
				$(adBeginSubdir) all $(adEndSubdir)

		For the `all' target in the example above, the default 
	$(adTESTS_MAKESUBDIR) recursively call `make' for all directory in 
	SUBDIR.  But now `make' in subdirectory does not always mean 
	`make all'.  We want to recursively call `make all', not simply 
	`make'.  Therefore we use the nonrecursive version $(adTESTS) 
	and explicit loop using the $(adBeginSubdir), $(adEndSubdir) 
	variables.


		If you only want to add additional commands for `all' target 
	such as stripping debugging information from executables.  Put the 
	following in ad.rule:

			DEFTARGETLIST	my_all

	and write your own my_all like this in ad.append:

			my_all : $(adTESTS_MAKESUBDIR)
				your strip commands here ...


	Building Makefiles in subdirectories
	------------------------------------
		Currently, subdirectory support by autodep is minimal.  It 
	assumes that all your source file for a particular executable target 
	is stored in the same directory.  Compiled objects and executables 
	are also store in that directory.

		There is only one command availble now, namely SUBDIR.  For 
	example, if all of your source file is in the `src' directory.  You 
	can write the following command in `ad.rule' that resides in your 
	base directory (parent directory of `src')

			SUBDIR src

	and write another `ad.rule' in `src' subdirectory to include all 
	command for compilation.  When you type autodep, two Makefiles are 
	created, one in base directory, the other in `src' directory.
	When you type `make', Makefile automatically call `make' in `src' 
	subdirectory.  You can have the same effect for rules you wrote by
	using the $(adBeginSubdir) and $(adEndSubdir) variables.


	Excluding Files in Dependency
	-----------------------------
		For whatever reason you have, you can remove certain include 
	files from dependency by placing them in EXCLUDE command like this:

			EXCLUDE somefile.h otherfile.h

	The special `EXCLUDE Makefile' command exclude Makefile from being 
	put into dependency.


	Linking Files Written in C and C++
	----------------------------------
		If you have `main.cc' written in C++ and `func.c' written in 
	C, use the following code:

			TARGET  testrun C++
				main.cc
				func.o
			TARGET	N/A	Cobj
				func.c

		The second target, type `Cobj' means that all source file 
	for that target will only be compiled in C mode.  func.o will be
	produced from func.c.  Since the name of executable is ignored, we put
	`N/A' as a dummy parameter.  In order to create the working 
	executable, we have to compile main.cc in C++ mode and linked with func.o.  
	Specifying the object file func.o as source works.  Alternatively, 
	you can replace the second TARGET command to

			TYPE	Cobj
				func.c

	which is equivalent.


Command Summary
===============

APPEND [file1 [file2 [...]]]	Use file instead of `ad.append'.  If files
				are not found in current directory, shared 
				data directory (which is, by default, 
				`/usr/local/share/autodep') is also searched.
				Files are used in the sequence given.

				If there is no files given, no file will be
				used for appending if no previous APPEND 
				commands were found, otherwise it has no
				effect.

CURDIR file1 [file2 [...]]	Specify that files are to be found in the
				current directory, not the directory given
				by $(srcdir) in Makefile.  File existence 
				check is also bypassed for these files.

DEBUG name1 [name2 [...]]	You will only use this if you are writing 
				extension modules for autodep.  Your module 
				may want to test for the presence of some 
				string supplied in this command in order to 
				generate extra stuff in Makefile for 
				regression tests.

DEFTARGET name			Use name instead of `all' for the default
				Makefile target ("default goal").

DEFTARGETLIST string ...	Use string as dependency rule for the default 
				Makefile target.  Default value is
				`$(adTESTS_MAKESUBDIR)'.

EXCLUDE file1 [file2 [...]]	Exclude list of file from searching for
				`#include' preprocessor.  They are not included 
				in dependency rules.
				As a special case, generated rules do not 
				include Makefile when `Makefile' is specified 
				here.

OUTPUT file			Output to file instead of `Makefile.ad'.

				Special case: when output file is 
				`Makefile.in' and `config.status' is present, 
				autodep also run config.status after
				Makefile.in is created.

PREPEND [file1 [file2 [...]]]	Use file instead of `ad.prepend'.  If files
				are not found in current directory, shared 
				data directory (which is, by default, 
				`/usr/local/share/autodep') is also searched.
				Files are used in the sequence given.

				If there is no files given, no file will be
				used for prepending if no previous PREPEND 
				commands were found, otherwise it has no
				effect.

SUBDIR dir ...			Recursively execute autodep for ad.rule's in 
				all dir.

TARGET targetfile [type] [param1 [param2 [...]]]	
	[source1 [sparam1 [sparam2 [...]]]]
	[source2 [sparam1 [sparam2 [...]]]]
	[...]			
				Check all sources for dependencies and build
				rules for compiling sources and linking the				targetfile.  Makefile is always included in
				the dependency unless explicitly told using 
				EXCLUDE command.

				If type is omitted, `C' is assumed.

				The meaning of param<n> and sparam<n> 
				(where n = 1, 2, ...) are type dependent.

				For a complete listing of type, targetfile, 
				param<n>, source<n> and sparam<n>,
				see the next section.

TYPE   type [targetfile] [param1 [param2 [...]]]
	[source1 [sparam1 [sparam2 [...]]]]
	[source2 [sparam1 [sparam2 [...]]]]
	[...]			
				Similar to TARGET command but type is the 
				required parameter here.  This is useful if 
				we don't need targetfile such as `Cobj' 
				type.

				If targetfile is omitted, `N/A' is assumed.

				The meaning of param<n> and sparam<n> 
				(where n = 1, 2, ...) are type dependent.

				For a complete listing of type, targetfile, 
				param<n>, source<n> and sparam<n>, 
				see the next section.

END				End of processing.  Discard the rest of
				file.

Note:
	For OUTPUT commands, new value override previously supplied value 
while all other commands add new values to the list.


Command Provided by Modules
===========================

INCLUDEPATH dir1 [dir2 [...]]	Use by the C/C++ module to search for header
				files.


Target Type Summary
===================

Note: type, targetfile, param<n> and source<n> below refer to parameters used 
in TARGET or TYPE command:

		TARGET targetfile [type] [param1 [param2 [...]]]
			[source1 [sparam1 [sparam2 [...]]]]
			[source2 [sparam1 [sparam2 [...]]]]
			[...]
	or	TYPE type [targetfile] [param1 [param2 [...]]]
			[source1 [sparam1 [sparam2 [...]]]]
			[source2 [sparam1 [sparam2 [...]]]]
			[...]

output is used for pipes.  For example, in

		TYPE type_a out_a | TYPE type_b out_b | TYPE type_c out_c ...
			source_a_1
			source_a_2
			...

outputs of out_a target will become sources of out_b target, outputs of out_b 
will become sources of out_c and so on.  There is no way to pass sparam<n>
from out_a to later targets.

	type: C
	-----
		Purpose:	Compile and link to produce executable using 
				C-style linkage.

		targetfile:	Taken as the executable file to be created.

		param<n>:	Not used.

		source<n>:	Can be any source files recognized by gcc.
				They will be compiled and linked.

				Objects and libraries of the form:
				- file.o
				- lib.a, lib.so with path explicitly
				  specified
				- -llib
				can be used for linking to create the
				executable file.

				Sources that begin with `-' or `$' are
				output in the linking comand in Makefile
				directly.  `-' is intended for linker 
				options such as `-static'.  `$' is for 
				options or libraries that depends makefile 
				variables such as `$(CURSES_LIB)'.

				At least one file must appear in this 
				parameter.

		sparam<n>:	It will appear as arguments in compilation
				command in Makefile.  This is useful if 
				certain files has to be compiled using 
				special options.  If all source files uses
				the same flags, it's better to specify them
				in the CFLAGS Makefile variable.

		output:		Executable file produced.

	type: Cobj
	-----
		Purpose:	Compile to object files for C-style linkage.
				Use this together with C++ target type to
				create executable containing both C and C++
				sources.

		targetfile:	Not used.

		param<n>:	Not used.

		source<n>:	Can be any source files recognized by gcc.
				They will be compiled and linked.

				Objects and libraries are ignored here.

				At least one file must appear in this 
				parameter.

		sparam<n>:	Same as C

		output:		Everything specified as sources.

	type: C++
	-----
		Purpose:	Compile and link to produce executable using 
				C++-style linkage.

		targetfile:	Taken as the executable file to be created.

		param<n>:	Not used.

		source<n>:	Same as C

		sparam<n>:	It will appear as arguments in compilation
				command in Makefile.  This is useful if 
				certain files has to be compiled using 
				special options.  If all source files uses
				the same flags, it's better to specify them
				in the CXXFLAGS Makefile variable.

		output:		Same as C

	type: C++obj
	-----
		Purpose:	Compile to object files for C++-style linkage.

		targetfile:	Not used.

		param<n>:	Not used.

		source<n>:	Same as Cobj

		sparam<n>:	Same as C++

		output:		Same as Cobj

	type: Cstaticlib and C++staticlib (still experimental - may not)
	-----
		Purpose:	Compile and link to produce static library 
				using C and C++ style linkage, repectively.
				You will need to define $(AR) and $(RANLIB)
				Makefile variables.

		targetfile:	Taken as the library file to be created.

		param<n>:	Not used.

		source<n>:	Same as C or C++

		sparam<n>:	Same as C or C++

		output:		The name of library file produced

		NOTE:		This target type is still experimental.
				It may not work on a variety of platforms.

	type: Cdynamiclib and C++dynamiclib (still experimental)
	-----
		Purpose:	Compile and link to produce dynamic library 
				using C and C++ style linkage, repectively.

		targetfile:	Taken as the library file to be created.

		param<n>:	Not used.

		source<n>:	Same as C or C++

		sparam<n>:	Same as C or C++

		output:		The name of library file produced

		NOTE:		This target type is still experimental.
				It may not work on a variety of platforms.
				It only works with C/C++ compilers that can 
				accept both -o and -c options in the 
				command line simultaneously.

autodep is designed so that more types can be added by user.  If you know 
Perl, especially those dealing with references and OOP, you can create one.  
See the file `MODULE' for more information.
