home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / automa.zip / AUTOMAKE.DOC < prev    next >
Text File  |  1993-07-06  |  23KB  |  946 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                                     AUTOMAKE v1.30
  23.  
  24.                              Makefile Maintenance Utility
  25.  
  26.                  Copyright (c) 1993 Roy Olsen.  All Rights Reserved.
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                         - i -
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                                      Terms of Use
  69.  
  70.  
  71.                You are free to use, copy and distribute AUTOMAKE as
  72.                long as no fee is charged and this documentation file
  73.                and the sample definition files accompany each copy.
  74.  
  75.                AUTOMAKE is provided "as is" without any warranty,
  76.                expressed or implied, including but not limited to
  77.                fitness for a particular purpose.
  78.  
  79.                Questions and suggestions for enhancements are welcome. 
  80.                Contact: Roy Olsen via Compuserve User ID 75040,527.
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.                                         - ii -
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                   Table of Contents
  128.  
  129.  
  130.  
  131.           Why Use AUTOMAKE? . . . . . . . . . . . . . . . . . . . . . .   1
  132.  
  133.           How AUTOMAKE Works  . . . . . . . . . . . . . . . . . . . . .   2
  134.  
  135.           AUTOMAKE Definition Files . . . . . . . . . . . . . . . . . .   3
  136.                Clipper Inference Rule . . . . . . . . . . . . . . . . .   3
  137.                Special AUTOMAKE Macros  . . . . . . . . . . . . . . . .   4
  138.                AUTOMAKE Macro . . . . . . . . . . . . . . . . . . . . .   5
  139.                Application Component Macros . . . . . . . . . . . . . .   6
  140.                     PRGS Macros . . . . . . . . . . . . . . . . . . . .   6
  141.                     Switch Macro Suffixes . . . . . . . . . . . . . . .   6
  142.                     LIBS Macros . . . . . . . . . . . . . . . . . . . .   8
  143.                     MODS Macros . . . . . . . . . . . . . . . . . . . .   8
  144.                CLP Macro  . . . . . . . . . . . . . . . . . . . . . . .   8
  145.                APPFILES Macro . . . . . . . . . . . . . . . . . . . . .   9
  146.                APPLIST Macro  . . . . . . . . . . . . . . . . . . . . .   9
  147.                #compile rules Directive . . . . . . . . . . . . . . . .  10
  148.                Linker Dependency Rule . . . . . . . . . . . . . . . . .  10
  149.                Sample Files . . . . . . . . . . . . . . . . . . . . . .  10
  150.  
  151.           Running AUTOMAKE  . . . . . . . . . . . . . . . . . . . . . .  11
  152.                Building Test and Final .EXE's . . . . . . . . . . . . .  12
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.                                        - iii -
  179.  
  180.  
  181.  
  182.                                   Why Use AUTOMAKE?
  183.  
  184.  
  185.           AUTOMAKE automates the task of creating and maintaining RMAKE and
  186.           linker script files for Clipper applications.  It provides a
  187.           method to specify all the components of an application, and the
  188.           details of compiling and linking them, in a single place.
  189.  
  190.           Normally to set up make and linker script files you must perform
  191.           a number of steps for each module (.PRG file):
  192.  
  193.                add a dependency rule for creating the object file,
  194.  
  195.                     <module.obj>: <module.prg>
  196.  
  197.                add the module to the .EXE dependency rule,
  198.  
  199.                     <app.exe>: <app.obj> <module.obj>
  200.  
  201.                and insert a command into the linker script file.
  202.  
  203.                     FILE <module>
  204.  
  205.  
  206.           AUTOMAKE simplifies this process so each module is entered only
  207.           once.  To use it, you create a definition file using RMAKE
  208.           commands that AUTOMAKE uses as a template for the make file.  The
  209.           definition file contains only the basic information needed to
  210.           compile and link an application.  The files needed to make an
  211.           application can be defined like this:
  212.  
  213.                PRGS = <app> <module> <another_module>
  214.                LIBS = NanFor
  215.  
  216.           Once the definition file is created, run AUTOMAKE to build the
  217.           RMAKE and linker script files; and optionally build a list of
  218.           files for archiving the application.
  219.  
  220.           Then, to create or rebuild the application .EXE type:
  221.  
  222.                RMAKE <application>
  223.  
  224.           and RMAKE will compile and link any files that don't exist or
  225.           need to be updated.
  226.  
  227.           AUTOMAKE greatly simplifies using RMAKE to build Clipper
  228.           applications.  It automatically creates RMAKE and linker script
  229.           files to your specifications, supporting a wide range of compile
  230.           and link scenarios without imposing a specific style or approach.
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.                                         - 1 -
  238.  
  239.  
  240.  
  241.                                   How AUTOMAKE Works
  242.  
  243.  
  244.           When you run AUTOMAKE it reads a definition file for an
  245.           application, along with make files from RMAKE #include
  246.           directives.  It creates a make file from the definition file;
  247.           inserting the dependency rules and macro definitions needed to
  248.           use it with RMAKE.  It also writes one or more link script files
  249.           containing the FILE, LIB and MODULE commands needed to link the
  250.           application.  Finally, AUTOMAKE creates a list of file names that
  251.           you can use to archive the application.
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.                                         - 2 -
  297.  
  298.  
  299.  
  300.                               AUTOMAKE Definition Files
  301.  
  302.  
  303.           Definition files use the same syntax as RMAKE.  Generally each
  304.           line in the definition file is copied verbatim to the RMAKE file.
  305.           The definition file header (all comment lines before the first
  306.           non-comment line) is discarded and a new header is created for
  307.           the RMAKE file.  All other comment lines are copied.  Lines that
  308.           are continued with a backslash are recognized as a single
  309.           command.
  310.  
  311.           Each line in the definition file is copied to the RMAKE file by
  312.           AUTOMAKE.  When it encounters the special AUTOMAKE directive
  313.           "#compile rules", it's replaced with dependency rules for Clipper
  314.           programs.  If this directive is not found AUTOMAKE puts the
  315.           dependency rules at the bottom of the make file.
  316.  
  317.           AUTOMAKE reads the macros it needs to create dependency rules and
  318.           converts any nested macro to its literal value.  If any macros
  319.           AUTOMAKE needs are not defined in the definition file or an
  320.           INCLUDE'd make file, it looks for a DOS environment variable
  321.           having the same name.  Macros that cannot be found are replaced
  322.           with the empty string.
  323.  
  324.           Clipper Inference Rule
  325.           ----------------------
  326.  
  327.           RMAKE uses an inference rule for dependencies that don't have
  328.           shell lines.  So if the make file contains:
  329.  
  330.                .prg.obj:
  331.                     Clipper $< /m
  332.  
  333.                MyApp.obj: MyApp.prg
  334.  
  335.           RMAKE acts as if the dependency was:
  336.  
  337.                MyApp.obj: MyApp.prg
  338.                     Clipper Myapp.prg /m
  339.  
  340.           If a ".prg.obj:" inference rule is not defined in the definition
  341.           file or an INCLUDE'd make file, AUTOMAKE uses the default
  342.           inference rule and puts it at the top of the RMAKE file.  The
  343.           default Clipper inference rule is:
  344.  
  345.                .prg.obj:
  346.                     set CLIPPERCMD=$(CLP)
  347.                     Clipper $<
  348.  
  349.           AUTOMAKE also uses the Clipper inference rule to create shell
  350.           lines for dependency rules of modules defined using a switch
  351.           macro suffix on the macro name.  (See: Switch Macro Suffixes.)
  352.  
  353.  
  354.  
  355.                                         - 3 -
  356.  
  357.  
  358.  
  359.           Special AUTOMAKE Macros
  360.           -----------------------
  361.  
  362.           These macros have special meanings to AUTOMAKE:
  363.                AUTOMAKE - configures how AUTOMAKE operates
  364.                PRGS - Clipper programs
  365.                LIBS - object library files
  366.                MODS - modules from object libraries that must occupy a
  367.                     specific position in the linker script or when multiple
  368.                     libraries contain modules with the same name
  369.                CLP - contains compiler switches used by the Clipper
  370.                     inference rule
  371.                APPFILES - specifies a list of applications files (Note:
  372.                     this macro is NOT copied to the RMAKE file)
  373.                APPLIST - (Optional) name of file containing application
  374.                     list
  375.  
  376.           The following macros are created by AUTOMAKE.  They begin with a
  377.           leading underscore to avoid conflicts with commonly used macro
  378.           names:
  379.                _ALL - name of recompile trigger file
  380.                _OBJ - list of .OBJ files
  381.                _ROOT or _OVL - name of file containing linker script
  382.                     commands (also can be _ROOTxxx or _OVLxxx)
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.                                         - 4 -
  415.  
  416.  
  417.  
  418.           AUTOMAKE Macro
  419.           --------------
  420.  
  421.           A macro named AUTOMAKE is used to specify AUTOMAKE options.  The
  422.           options that can be specified are:
  423.  
  424.                _ALL - causes AUTOMAKE to create a recompile trigger file,
  425.                     assign its name to the macro _ALL and make each .OBJ
  426.                     file dependant on $(_ALL).  If the timestamp is updated
  427.                     on this file, running RMAKE will recompile all Clipper
  428.                     programs.
  429.  
  430.                     For example, if the AUTOMAKE macro is defined like:
  431.  
  432.                          AUTOMAKE = _ALL
  433.  
  434.                     then AUTOMAKE produces:
  435.  
  436.                          _ALL = <application>.ALL
  437.  
  438.                          MyApp.obj: MyApp.prg $(_ALL)
  439.  
  440.                _OBJS - causes AUTOMAKE to create the macro _OBJS containing
  441.                     a list of .OBJ files to use in the linker dependency
  442.                     rule like:
  443.  
  444.                          $(EXE): $(_OBJS)
  445.  
  446.                     For example, if the AUTOMAKE macro is defined like:
  447.  
  448.                          AUTOMAKE = _ALL _OBJ
  449.  
  450.                     then AUTOMAKE produces:
  451.  
  452.                          _OBJS = MyApp.obj Mod1.obj Mod2.obj
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.                                         - 5 -
  474.  
  475.  
  476.  
  477.           Application Component Macros
  478.           ----------------------------
  479.  
  480.           The PRGS, LIBS and MODS macros are where the modules that make up
  481.           an application are specified.  When you create these macros, use
  482.           only root file names.  Do not specify the file path or extension. 
  483.  
  484.           These macros names can have a suffix that indicates which section
  485.           of the linker script to put these modules.  The suffix can be
  486.           _ROOT or _OVL, or a modified form of either like _ROOTA or _OVL1
  487.           (you can specify up to ten linker script sections).  Each section
  488.           is placed in a separate file having .LN0 to .LN9 as its extension
  489.           and the file name is assigned to a macro with the same name as
  490.           the suffix.  If no suffix is specified, then _ROOT is used.
  491.  
  492.           PRGS Macros -
  493.                These macros specify Clipper programs.  A dependency rule
  494.                and linker script FILE command is created for each macro
  495.                element.  For example, if the definition file contains:
  496.  
  497.                     PRGS = MyApp
  498.  
  499.                the AUTOMAKE creates a dependency rule in the make file:
  500.  
  501.                     MyApp.obj: MyApp.prg
  502.  
  503.                and a command in the linker script file:
  504.  
  505.                     FILE MyApp
  506.  
  507.                Optionally, if _OBJS is an element of the AUTOMAKE macro,
  508.                then after the dependency rules AUTOMAKE puts:
  509.  
  510.                     _OBJS = MyApp.obj
  511.  
  512.           Switch Macro Suffixes -
  513.                PRGS macro names can contain an additional suffix specifying
  514.                an alternate compiler switch macro to use for these
  515.                programs.  The name of this macro is the suffix minus its
  516.                leading underscore.  This capability is useful, for
  517.                instance, when Clipper 5 and generic Xbase programs are
  518.                combined.  AUTOMAKE creates explicit shell lines for these
  519.                programs using the Clipper inference rule shell lines.  All
  520.                occurrences of $(CLP) are replaced with the compiler switch
  521.                macro name.
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                                         - 6 -
  533.  
  534.  
  535.  
  536.           Switch Macro Suffixes (continued) -
  537.  
  538.                When the definition file contains:
  539.  
  540.                     CLP = /m /n /w
  541.                     XBASE = /a /m
  542.                     PRGS_XBASE = OldMod1 OldMod2
  543.  
  544.                and the Clipper inference rule is:
  545.  
  546.                     .prg.obj:
  547.                          set CLIPPERCMD=$(CLP)
  548.                          Clipper $<
  549.  
  550.                AUTOMAKE creates dependency rules for _XBASE programs like:
  551.  
  552.                     OldMod1.obj: OldMod1.prg
  553.                          set CLIPPERCMD=$(XBASE)
  554.                          Clipper $<
  555.  
  556.                When a PRGS macro name contains a section suffix along with
  557.                a switch macro suffix, the section suffix should come first
  558.                in the macro name:
  559.  
  560.                     PRGS_OVL_XBASE = OldMod1 OldMod2
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                         - 7 -
  592.  
  593.  
  594.  
  595.           LIBS Macros - 
  596.                AUTOMAKE puts a LIB command in the linker script file for
  597.                each element of these macros.  For example:
  598.  
  599.                     LIBS = NanFor DbfMdx
  600.  
  601.                causes AUTOMAKE to add this to the linker file assigned to
  602.                the _ROOT macro:
  603.  
  604.                     LIB NanFor
  605.                     LIB DbfMdx
  606.  
  607.                An example that puts a library in the overlay is:
  608.  
  609.                     LIBS_OVL = Extend
  610.  
  611.                which causes AUTOMAKE to add this to the linker file
  612.                assigned to the _OVL macro:
  613.  
  614.                     LIB Extend
  615.  
  616.           MODS Macros -
  617.                For each element of these macros AUTOMAKE puts a MODULE in
  618.                the linker script file:
  619.  
  620.                     MODS_OVL = AmPm
  621.  
  622.                results in this being added to the linker file assigned to
  623.                the _OVL macro:
  624.  
  625.                     MODULE AmPm
  626.  
  627.                Additionally a MODULE...FROM command for Blinker can be
  628.                generated by specifying the source library followed by the
  629.                module name in parenthesis:
  630.  
  631.                     MODS = Clipper(FError)
  632.  
  633.                results in:
  634.  
  635.                     MODULE Ferror FROM Clipper
  636.  
  637.  
  638.           CLP Macro
  639.           ---------
  640.  
  641.           The CLP macro containing the standard Clipper compiler switches
  642.           must exist and be used by the Clipper inference rule if any
  643.           dependency rules are generated using an alternate switch macro. 
  644.           (For more information see: Switch Macro Suffixes.)
  645.  
  646.  
  647.  
  648.  
  649.  
  650.                                         - 8 -
  651.  
  652.  
  653.  
  654.           APPFILES Macro
  655.           --------------
  656.  
  657.           If this macro is defined, AUTOMAKE generates a list of
  658.           application files with one file per line.  The file list is for
  659.           archiving the source, header and make files for an application
  660.           (using PKZIP, for instance).  The appropriate MAKEPATH[.<ext>]
  661.           macro is used to search for each file and the directory is added
  662.           to the file name.  If the file is in the current directory or
  663.           cannot be found on the path, then the file name is listed with no
  664.           directory.
  665.  
  666.           In order to add extensions to the elements of a macro, AUTOMAKE
  667.           supports macro expressions using the macro append operator: ">". 
  668.           To use it add a comma after the macro name, then the ">" followed
  669.           by the extension to be appended.   Assuming the following macro
  670.           definitions:
  671.  
  672.                PRGS = MyApp Mod1 Mod2
  673.                LIBS = NanFor
  674.                makepath[.lib] = $(LIB)
  675.                APPFILES = $(PRGS,>.prg) $(LIBS,>.lib)
  676.  
  677.           and the DOS environment variable:
  678.  
  679.                LIB=C:\CLIPPER\LIB
  680.  
  681.           then AUTOMAKE generates a file list containing:
  682.  
  683.                MyApp.prg
  684.                Mod1.prg
  685.                Mod2.prg
  686.                C:\CLIPPER\LIB\NanFor.lib
  687.  
  688.           Note: because it can contain macro expressions which are not
  689.           supported by RMAKE, the APPFILES macro is not copied to the .RMK
  690.           file.
  691.  
  692.  
  693.           APPLIST Macro
  694.           -------------
  695.  
  696.           This macro specifies the file to use for the list generated from
  697.           the APPFILES macro.  If this macro is not defined the name
  698.           "FILES.LST" is used.
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.                                         - 9 -
  710.  
  711.  
  712.  
  713.           #compile rules Directive
  714.           ------------------------
  715.  
  716.           This special AUTOMAKE directive is used in the definition file to
  717.           specify where to put the dependency rules.  AUTOMAKE removes it
  718.           and inserts the dependency rules for Clipper programs in its
  719.           place.  If it's not found AUTOMAKE puts the dependency rules at
  720.           the bottom of the make file.  However, in order for RMAKE to work
  721.           properly the Clipper dependency rules must precede the linker
  722.           dependency rule.
  723.  
  724.           Linker Dependency Rule
  725.           ----------------------
  726.  
  727.           Place a linker dependency rule at the bottom of the definition
  728.           file (after the "#compile rules" directive).  A simple and
  729.           generic example is:
  730.  
  731.                $(EXE).exe: $(_OBJS)
  732.                     RTLink @$(_ROOT)
  733.  
  734.           See Building Test and Final .EXE's for a complex example.
  735.  
  736.           Sample Files
  737.           ------------
  738.  
  739.           Several sample files accompany AUTOMAKE and provide additional
  740.           examples:
  741.  
  742.                BASIC.DEF - simple definition file
  743.                APP.DEF - definition file using an INCLUDE'd make file
  744.                COMMON.RMK - RMAKE file containing commands used in common
  745.                     by multiple applications (used by APP.DEF)
  746.                BLINKER.DEF - definition uses BLINKER to link, has explicit
  747.                     overlay area, provides test and final compile/link and
  748.                     has AUTOMAKE create a file list for the application
  749.                TEST.RMK & FINAL.RMK - Blinker scripts for test and final
  750.                     linking
  751.                VERS.BAT - batch file for saving PKZIP archives
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.                                         - 10 -
  769.  
  770.  
  771.  
  772.                                    Running AUTOMAKE
  773.  
  774.  
  775.           Once a definition file is created for an application, run
  776.           AUTOMAKE using the syntax:
  777.  
  778.                AUTOMAKE <definition_file>[.DEF]
  779.  
  780.           AUTOMAKE forms the names of the make, linker script and trigger
  781.           files using the root of the definition file name with different
  782.           extensions.  It creates:
  783.                - an RMAKE command file with an .RMK extension
  784.                - one or more linker script files with .LN<n> extensions
  785.                - optionally, a recompile trigger file with an .ALL
  786.                     extension
  787.           If you include a directory with the definition file name, the
  788.           above files are created in that directory.
  789.  
  790.           If you type:
  791.  
  792.                AUTOMAKE MYAPP
  793.  
  794.           it reads the definition file MYAPP.DEF and creates MYAPP.RMK,
  795.           MYAPP.LN0 and MYAPP.ALL.
  796.  
  797.           To build the application .EXE type:
  798.  
  799.                RMAKE MYAPP
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.                                         - 11 -
  828.  
  829.  
  830.  
  831.           Building Test and Final .EXE's
  832.           ------------------------------
  833.  
  834.           When developing an application you probably want to include
  835.           information for the Clipper debugger during testing, then rebuild
  836.           the .EXE for production use after the application is tested.  The
  837.           following approach allows either to be built from the make file.
  838.  
  839.                1) Have AUTOMAKE create a recompile trigger file.  Put the
  840.                following line at the top of the definition file:
  841.  
  842.                     AUTOMAKE = _ALL
  843.  
  844.                2) Create a conditional compiler switch definition.  Also,
  845.                define the "ALL" macro for the final rebuild:
  846.  
  847.                     CLP = /a /m /n
  848.  
  849.                     #ifdef  FINAL
  850.                          ALL = Y
  851.                          CLP := $(CLP) /l
  852.                     #else
  853.                          CLP := $(CLP) /b /p
  854.                     #endif
  855.  
  856.                3) Update the timestamp on the .ALL file if "ALL" is
  857.                defined:
  858.  
  859.                     #ifdef  ALL
  860.                          #! echo > $(_ALL)
  861.                     #endif
  862.  
  863.           After you do this and run AUTOMAKE, this command compiles for
  864.           testing:
  865.  
  866.                RMAKE <app>
  867.  
  868.           this command recompiles without debugging information:
  869.  
  870.                RMAKE <app> /DFINAL
  871.  
  872.           and this command recompiles with debugging information:
  873.  
  874.                RMAKE <app> /DALL
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.                                         - 12 -
  887.  
  888.  
  889.  
  890.           You may also want different linker script commands for test and
  891.           final linking.  This can be accomplished by conditionally
  892.           INCLUDE'ing the appropriate linker script:
  893.  
  894.                #ifdef FINAL
  895.                     #include Final.rmk
  896.                #else
  897.                     #include Test.rmk
  898.                #endif
  899.  
  900.           where "TEST.RMK" contains something like:
  901.  
  902.                $(EXE).exe: $(_OBJS) 
  903.                     echo BLINKER INCREMENTAL PAD 256> $(SCRIPT) 
  904.                     echo OUTPUT $(EXE)>> $(SCRIPT) 
  905.                     echo BEGINAREA>> $(SCRIPT) 
  906.                     echo @$(_OVL)>> $(SCRIPT) 
  907.                     echo ENDAREA>> $(SCRIPT) 
  908.                     echo @$(_ROOT)>> $(SCRIPT) 
  909.                     Blinker @$(SCRIPT) 
  910.  
  911.           and "FINAL.RMK" contains something like:
  912.  
  913.                $(EXE).exe: $(_OBJS) 
  914.                     echo BLINKER INCREMENTAL OFF> $(SCRIPT) 
  915.                     echo OUTPUT $(EXE)>> $(SCRIPT) 
  916.                     echo @$(_OVL)>> $(SCRIPT) 
  917.                     echo @$(_ROOT)>> $(SCRIPT) 
  918.                     Blinker @$(SCRIPT) 
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.                                         - 13 -
  946.