Browse Prior Art Database

Generation of 16 Bit/32 Bit/Optimized/Debug Executables from Single Source

IP.com Disclosure Number: IPCOM000106743D
Original Publication Date: 1993-Dec-01
Included in the Prior Art Database: 2005-Mar-21
Document File: 4 page(s) / 77K

Publishing Venue

IBM

Related People

Reish, TG: AUTHOR [+3]

Abstract

Code is no longer generated for a single environment. Today, programming labs are generating 16 bit, 32 bit, optimized, and debug enabled executables. Each of these types of executables requires unique compilers, compiler options, linkers, link options, etc. The problem is how to reduce the possibility of error by generating all four types of executables from the same source files, in the same directory, with one makefile. This would significantly reduce the possibility of error because individual sets of source code would not need to be maintained for each type of executable.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 53% of the total text.

Generation of 16 Bit/32 Bit/Optimized/Debug Executables from Single Source

      Code is no longer generated for a single environment.  Today,
programming labs are generating 16 bit, 32 bit, optimized, and debug
enabled executables.  Each of these types of executables requires
unique compilers, compiler options, linkers, link options, etc.  The
problem is how to reduce the possibility of error by generating all
four types of executables from the same source files, in the same
directory, with one makefile.  This would significantly reduce the
possibility of error because individual sets of source code would not
need to be maintained for each type of executable.

      To solve this problem we will need to define one make file that
can generate intermediate and executable files with unique names
depending on the type of executable that is desired.  The following
is a list of what our makefile will need to do:

o   Determine which compiler to use depending on the target
    environment (16 or 32 bit)

o   Define which compile options to use depending on whether the
    executable is to be optimized or debugged.

o   Define the names of the intermediate files that will be generated
    of which we will need four (2 compilers * 2 sets of compiler
    options).

o   Determine which intermediate file names to pass into the linker
    (16 optimized, 16 debug, 32 optimized, or 32 debug .OBJ file
    names).

o   Determine which linker to use (16 or 32 bit).

o   Determine which component definitions file to use (16 or 32 bit).

o   Define the names of the executables or output files.

      The following is an example makefile that solves these
problems.  We will use macro definitions heavily in the makefile to
generate a set of 16 bit optimized, 16 bit debug, 32 bit optimized,
and 32 bit debug executables.

# Define 32 bit compile macros if building 32 bit executables

  !if ("$(VERSION)" == "32")

 lin...