Modifying the Makefile

Modify the package Makefile files when you

  • Add a new prototype file (function.proto).

  • Add a new system type.

  • Add new library files.

The following sections provide brief examples of how to modify the Makefile file for these reasons.

Adding a New Prototype File

When you create a new prototype file, add the file name and each system type for which it is to be built into the CONFIG section of the Makefile file.

For example, to add a function.proto file for alpha_dux40 and hp_ux110, add the following entries to the CONFIG section:

   CONFIG = \
   ...
           function.alpha_dux40 \
           function.hp_ux110 \
   ...

If you have added new library files for this prototype function, add those to the MACHINE_LIBS section.

Adding a New System Type

For each prototype file that you want to build for the new system type, add an entry to the CONFIG section. Also add any new libraries to the MACHINE_LIBS section, and the new system type to the .SUFFIXES section.

The following example shows the modifications appropriate when building the staff and minimal prototype files for this new system type.

   CONFIG = \
   ...
           staff.sysname \
           minimal.sysname \
   ...

If you have created corresponding library files for this new machine type, add them to the MACHINE_LIBS section.

   MACHINE_LIBS = \
   ...
           ${wsadmin}/lib/sysname.generic \
           ${wsadmin}/lib/sysname.generic.dev \
           ${wsadmin}/lib/sysname.readonly \
           ${wsadmin}/lib/sysname.readwrite \
   ...

Add the new system type to the SUFFIXES section.

   .SUFFIXES: ...\
            .sysname \
   ...

Add a line to build the configuration files for this system in the section with the rest of the commands to build configuration files:

   .proto.sysname: ; mpp -Dwsadmin=${wsadmin} \
   -Dsys=sysname  -Dname=$* $*.proto > $

Adding New Library Files

If you added a new library file for each system type, sysname.library_file, add these files to the MACHINE_LIBS section of the Makefile.

   MACHINE_LIBS = \
   ...
           ${wsadmin}/lib/rs_aix42.library_file \
   ...
           ${wsadmin}/lib/alpha_dux40.library_file \
   ...
           ${wsadmin}/lib/sun4x_56.library_file \
   ...

If you added a new library file that is common to all system types, library_file, add this only to the BASE_LIBS section:

   BASE_LIBS = \
   ...
           ${wsadmin}/lib/library_file \
   ...