NAME

   mkDmk - make DMakefiles


VERSION

   Version 1.1


SYNOPSIS

   mkDmk <object-name> <filename> [ [filename] ...]

   filename is any valid Amiga filename with a .c, including Amiga
   wildcards.


DESCRIPTION

   MkDmk generates DMakefiles for DICE (TM). The format for these is:

-------------------------------------------------------------------------
#
#     DMakefile for mkDmk, by mkDmk Version 1.1
#     Generated: Sun Jun 28 12:20:59 1992
#

CC     = dcc
LN     = dcc
CFLAGS = -r -ms -mRR -proto
LFLAGS = $(CFLAGS) -lm
DTMP   = dtmp:

mkDmk: $(DTMP)mkDmk.o
	$(LN) $(LFLAGS) -o %(left) %(right:*.o)

$(DTMP)mkDmk.o: mkDmk.c proto.h
	$(CC) -c $(CFLAGS) mkDmk.c

clean:
	delete $(DTMP)#?.o

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

    If you don't want the flags specified you must either alter the source
    for mkDmk or edit the file. Neither of these options is particularly
    arduous.

    The program works by scanning the source files specified on the command
    line, and recursively entering #include files found in the files. The
    name of the object file is specified as the first command line argument,
    and may not be a wildcard. If a line grows too long it is wrapped in a
    very simpleminded manner.

    There is a comprehensive error checking and reporting system. Error
    messages (as comments) and the DMakefile are sent to stdout, which you
    must redirect as required. For example, to generate the above listing on
    the console, I typed:

	mkDmk mkDmk mkDmk.c

    To send it to a DMakefile I typed:

	mkDmk >DMakefile mkDmk mkDmk.c

    If you wanted a DMakefile for a program named goodmusicians, which was
    based on a number of source files in a number of directories:

	mkDmk >DMakefile goodmusicians gm#?.c Zappa.c ram:Prince.c t:Saints.c

    which is not to imply that Prince is a sheep.

    Note that UNIX style wildcards are out. For example:

	mkDmk goodmusicians FredNerd*.c

    is WRONG.


OPTIONS

    There are none.


BUGS

    This program works with a maximum of 64 source files, and the maximum
    number of characters in a string of included files is 256 chars
    (including padding).

    The long line formatting can get untidy sometimes.

    There are no options. You will have to alter the compiler flags by
    hand. Note that I have put the math library into the linker flags,
    which may cost you some disk/RAM space.

    There is DICE specific code in mkDmk.c

    Include files in other directories are not scanned for sub-included
    files unless the name contains the path, although their names are put
    in the DMakefile dependency list, with a warning comment line.

    If there are too many object files for dcc's command line at the
    link phase, you will have to alter the DMakefile by hand to use join to
    join them together into a smaller number of object files.

    If you fix these please let me know. Only the last mentioned problem
    makes me feel distraught.


SEE ALSO

    There is another program around called makemake, of which there are two
    versions. One version (the original) was very idiosyncratic. The other,
    is revamped by Mike Meyer and included with MG3beta. It generates code
    for other compilers.


AUTHOR

   Mike Thomas, mjt@vulcan.anu.edu.au
		mjt@romeo.anu.edu.au

   Date: 30/6/92

COPYRIGHT

   This program is in the Public Domain, and was written entirely by me. It
   was inspired by the need to radically rewrite large UNIX (TM) makefiles
   for DMake, which I found to be a very unpleasant task.

