Annotation of os232sdk/toolkt20/c/samples/template/template.mak, revision 1.1.1.1

1.1       root        1: #===================================================================
                      2: #
                      3: #   Template Make file
                      4: #   Created 1989, 1990 Microsoft Corporation
                      5: #
                      6: #===================================================================
                      7: 
                      8: #-------------------------------------------------------------------
                      9: #   .SUFFIXES line helps NMAKE recognize other file suffixes besides
                     10: #   .c, .exe, etc.
                     11: #-------------------------------------------------------------------
                     12: .SUFFIXES: .res .rc .hlp .ipf
                     13: 
                     14: 
                     15: #===================================================================
                     16: #
                     17: # Macro definitions
                     18: #
                     19: #   These macro definitions set are used to set up the options needed
                     20: #   to build the application.  Such options include the command line
                     21: #   options for the compiler and the libraries needed for the linker.
                     22: #   The flags are created as macros so that they can be easily modified
                     23: #   so they need to be changed.
                     24: #
                     25: #   The macros also allow you to have a different set of options
                     26: #   for each environment your application is built for.  The macros
                     27: #   below include the flags for compiling the application in the
                     28: #   32=bit and 16=bit memory models.  You can also add flags for a
                     29: #   a retail version of the product, a version which does not contain
                     30: #   any codeview symbols and has the maximum optimization.
                     31: #
                     32: #===================================================================
                     33: AS = masm
                     34: AFLAGS =
                     35: AXFLAGS =
                     36: CC = cl386
                     37: CFLAGS16 = -u -c -Gs -Od -W3 -Zpei -AL -DLINT_ARGS
                     38: CFLAGS32 = -c -Gs -Od -W3 -Zi -B1 c1l_386 -DLINT_ARGS
                     39: CINC32 = 
                     40: DFLAGS =
                     41: LINK16 = link
                     42: LIBS16 = llibcep os2
                     43: LINK32 = link386
                     44: LIBS32 = libc os2386
                     45: LFLAGS = /MAP/CO/NOD
                     46: RC = ..\..\..\os2bin\rc
                     47: HEADERS = main.h xtrn.h
                     48: 
                     49: 
                     50: #-------------------------------------------------------------------
                     51: #   This section is used to set which options macros are to be used
                     52: #   in the build.  By changing the macro names on the right, we can
                     53: #   change which environment the application will be built for.  This
                     54: #   application currently uses the flags for the 32-bit memory model.
                     55: #-------------------------------------------------------------------
                     56: LINK = $(LINK32)
                     57: CFLAGS = $(CFLAGS32)
                     58: LIBS = $(LIBS32)
                     59: CINC = $(CINC32)
                     60: 
                     61: 
                     62: #===================================================================
                     63: #
                     64: # Default inference rules
                     65: #
                     66: #   This section lists the command and flags to build each type of
                     67: #   of source file listed.
                     68: #
                     69: #===================================================================
                     70: .c.obj:
                     71:     $(CC) $(CFLAGS) $(CINC) $*.c
                     72: 
                     73: .asm.obj:
                     74:     $(AS) $(AFLAGS) $(AXFLAGS) $*.asm;
                     75: 
                     76: .rc.res:
                     77:     $(RC) -r $*.rc
                     78: 
                     79: #-------------------------------------------------------------------
                     80: #   A list of all of the object files
                     81: #-------------------------------------------------------------------
                     82: ALL_OBJ1 = main.obj user.obj init.obj pnt.obj dlg.obj help.obj
                     83: ALL_OBJ2 = file.obj edit.obj prnt.obj thrd.obj
                     84: 
                     85: 
                     86: 
                     87: #-------------------------------------------------------------------
                     88: #   A list of all of the Help text files
                     89: #-------------------------------------------------------------------
                     90: ALL_IPF = main.ipf file.ipf edit.ipf help.ipf dlg.ipf menu.ipf
                     91: 
                     92: 
                     93: 
                     94: #-------------------------------------------------------------------
                     95: #   This section lists all files to be built by the make.  The
                     96: #   makefile builds the executible as well as its associated help
                     97: #   file.
                     98: #-------------------------------------------------------------------
                     99: all: template.exe template.hlp
                    100: 
                    101: 
                    102: #-------------------------------------------------------------------
                    103: #   This section creates the command file used by the linker.  This
                    104: #   command file is recreated automatically every time you change
                    105: #   the object file list, linker flags, or library list.
                    106: #-------------------------------------------------------------------
                    107: template.lnk: template.mak
                    108:     echo $(ALL_OBJ1) +           > template.lnk
                    109:     echo $(ALL_OBJ2)            >> template.lnk
                    110:     echo template.exe           >> template.lnk
                    111:     echo template.map $(LFLAGS) >> template.lnk
                    112:     echo $(LIBS)                >> template.lnk
                    113:     echo template.def           >> template.lnk
                    114: 
                    115: 
                    116: 
                    117: #===================================================================
                    118: #
                    119: # Dependencies
                    120: #
                    121: #   This section lists all object files needed to be built for the
                    122: #   application, along with the files it is dependent upon (e.g. its
                    123: #   source and any header files).
                    124: #
                    125: #===================================================================
                    126: 
                    127: main.res: main.rc main.ico main.h dlg.h template.dlg help.rc help.h
                    128: 
                    129: main.obj: main.c $(HEADERS)
                    130: 
                    131: file.obj: file.c $(HEADERS)
                    132: 
                    133: edit.obj: edit.c $(HEADERS)
                    134: 
                    135: user.obj: user.c $(HEADERS)
                    136: 
                    137: init.obj: init.c $(HEADERS)
                    138: 
                    139: pnt.obj: pnt.c $(HEADERS)
                    140: 
                    141: dlg.obj: dlg.c $(HEADERS)
                    142: 
                    143: help.obj: help.c $(HEADERS) help.h
                    144: 
                    145: prnt.obj: prnt.c $(HEADERS)
                    146: 
                    147: thrd.obj: thrd.c $(HEADERS)
                    148: 
                    149: 
                    150: 
                    151: #-------------------------------------------------------------------
                    152: #   This section creates the help manager file.  The IPF compiler
                    153: #   creates a file called main.hlp which is renamed to template.hlp.
                    154: #-------------------------------------------------------------------
                    155: template.hlp: $(ALL_IPF)
                    156:      ipfc main.ipf /W3
                    157:      if exist template.hlp del template.hlp
                    158:      rename main.hlp template.hlp
                    159: 
                    160: 
                    161: #-------------------------------------------------------------------
                    162: #   This section links the object modules into the finished program
                    163: #   using the linker command file created earlier.  At the end, the
                    164: #   resource file is bound to the application.
                    165: #-------------------------------------------------------------------
                    166: template.exe: $(ALL_OBJ1) $(ALL_OBJ2) template.def template.lnk main.res
                    167:     $(LINK) @template.lnk
                    168:     $(RC) main.res template.exe

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.