Dec 172017
 
GENMAK is a program for creating customized MAKE files compatible with the Turbo MAKE utility. The output created by GENMAK can be easily modified with the TC editor.
File GENX.ZIP from The Programmer’s Corner in
Category C Source Code
GENMAK is a program for creating customized MAKE files compatible with the Turbo MAKE utility. The output created by GENMAK can be easily modified with the TC editor.
File Name File Size Zip Size Zip Type
GENDOX.TXT 4855 1985 deflated
GENMAK.EXE 88832 40127 deflated
GENMAK.UL 291 212 deflated
GEN_SAMP.MAK 5537 1050 deflated

Download File GENX.ZIP Here

Contents of the GENDOX.TXT file


User notes for GENMAK
---------------------

GENMAK is a program for creating customized MAKE files compatible with
the Turbo MAKE utility. The output created by GENMAK can be
easily modified with the TC editor. Requirements for using GENMAK
are:
- the Turbo Make utility
- a librarian utility
- a linking utility

The ideal conditions for GENMAK are when between 15 - 20 EXE files
must be created and there are between 30 - 40 OBJ support files.


GENMAK philosophy
-----------------

GENMAK thinks that a directory containing a variable number of C and H
files are all related in some way to a "target" system:

- some C files are intended to become EXE files

- some C files are intended to become OBJ files
that support those in the first category

- H files, INC files, etc. should be specified in
MAKE dependency rules, but are not intended to
become EXE or OBJ files

Because the number of OBJ modules can sometimes be quite large, the
maximum size of the LINK/TLINK command tail (128 bytes) poses problems.
To work around this, GENMAK likes to put all OBJ files into a single
LIB file (designated by the MAKE macro, PROJECT_LIBRARY). This approach
requires that you have a librarian utility, such as LIB, OLIB, TLIB, etc
(designated by the MAKE macro, LIBRARIAN_NAME) in your PATH.

When the EXE files are linked, the project library is included.

Detailed instructions
---------------------

1. Move all the C files needed by your target system
into the directory containing GENMAK.

2. Run GENMAK

a. The information panel provides an opportunity
to adjust the macros. The default values
assume a LARGE memory model with the related
link files (C0L.OBJ, etc) on drive D:

If you are using commercial libraries, be
sure to include those in the LINK_SUFFIX
macro. Failure to do this may cause a
system crash when LINK/TLINK gets underway.

b. GENMAK then examines each C file for
occurences of the include directive. When
an include directive is encountered (even
those commented or ifdef'ed out), it uses
the following rule: if the include file
is enclosed in angle brackets (such as
), it is ignored; if the include
file is enclosed in quotes, it is picked up
as a MAKE dependency.

c. When the scanning process is complete, GENMAK
will a pop-up menu to determine the disposition
of each file:

- The file should be compiled to an OBJ
file. In this case, the file is
compiled and added to your project
library (a "lib" file).

- The file should be compiled as an EXE
file. In this case, the file is compiled
and linked to the project library file.

- The file should be ignored.

d. GENMAK will return with a message giving the file
specification of the MAKE file, it will look some-
thing like TMP1.$$$ as it is named via the "tmpnam"
function.

3. Pull the new MAKE file into a text editor and make
any necessary modifications. With the Turbo MAKE
utility, you can simulate a run with the -n option
(make -n -ftmp1.$$$).

Caveats and Observations
------------------------

Creating a MAKE macro to specify your "include" and "lib"
subdirectories is a bewildering exercise. My advice is to
forget it.

An interesting idea for those particularly convoluted situations
is to try something like: make -n -fmymake >oneshot.bat
then edit the batch file.

Don't forget that the Microsoft linker will concatenate the
options you pass on the command tail with any options existing
in your LINK environment variable. My autoexec contains the
command:

set link=/SE:1000 /PAC /F

Another interesting, not clearly documented feature of the
Turbo Make utility is the ability to insert a dependency
condition without having a related command. This is my
technique for incorporating multiple EXE files into a
single make (using a "psuedo" rule called COMPLETE).

GENMAK does not understand the following concepts:

- Nested includes
- Include statements that have been commented out
- Include statements that have been defined out

GENMAK is public domain. You are free to use/gain from it as
you see fit without obligation on your part. There is no
obligation or liability on my part. Garry J. Vass [72307,3311]


 December 17, 2017  Add comments

Leave a Reply