home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / viscobv6.zip / vac22os2 / ibmcobol / samples / smrtsort / makefile next >
Makefile  |  1995-07-18  |  5KB  |  109 lines

  1. # --------------------------------------------------------
  2. #  Licensed Material -- Property of IBM
  3. #  5765-349
  4. #  (c) Copyright IBM Corporation 1995
  5. #  All rights reserved
  6. # --------------------------------------------------------
  7.  
  8. # Change the following variable to point
  9. # at the SMARTsort top-level directory
  10. SMARTSORT  = d:\smrtsort             
  11.  
  12. SAMPLE_DIR = $(SMARTSORT)\samples
  13. SAMPLE_BIN = $(SAMPLE_DIR)\bin
  14. SAMPLE_OUT = $(SAMPLE_DIR)\output
  15. SORT_INC   = $(SMARTSORT)\include
  16.  
  17. #------------------------------------------------------------------------------*
  18. # Define compiler flag and linker flag macros.                                 *
  19. #------------------------------------------------------------------------------*
  20. macros  = /DOS2
  21.  
  22. cmpflgs = /Q /C /I$(SORT_INC) $(macros) /Ti
  23. lnkflgs = /Q /B"/A:4 /E /F /M:FULL /NOI /NOL /BAT /W /DE"
  24.  
  25. #------------------------------------------------------------------------------*
  26. # Define object files that will be created                                     *
  27. #------------------------------------------------------------------------------*
  28. SAMPLES = $(SAMPLE_DIR)\sample1.exe      \
  29.           $(SAMPLE_DIR)\sample2.exe      \
  30.           $(SAMPLE_DIR)\sample3.exe      \
  31.           $(SAMPLE_DIR)\sample4.exe      \
  32.           $(SAMPLE_DIR)\sample5.exe      \
  33.           $(SAMPLE_DIR)\sample6.exe      
  34.  
  35. #-----------------------------------------------------------------------------*
  36. # Build sample code                                                           *
  37. #-----------------------------------------------------------------------------*
  38. all:  DIR_CHECK $(SAMPLES)
  39.  
  40. #-----------------------------------------------------------------------------*
  41. # Ensure directories exist                                                    *
  42. #-----------------------------------------------------------------------------*
  43. DIR_CHECK:
  44.    @-if not exist $(SAMPLE_BIN)   mkdir $(SAMPLE_BIN)
  45.    @-if not exist $(SAMPLE_OUT)   mkdir $(SAMPLE_OUT)
  46.  
  47. #-----------------------------------------------------------------------------*
  48. # Define dependency relationships for the object files                        *
  49. #-----------------------------------------------------------------------------*
  50. $(SAMPLE_DIR)\sample1.exe: $(SAMPLE_BIN)\sample1.obj 
  51.    cd                   $(SAMPLE_DIR)
  52.    icc.exe $(lnkflgs)   /Fe$*.exe /Fm$*.map                                   \
  53.                         $(SAMPLE_BIN)\sample1.obj                             \
  54.                         os2386.lib                                            \
  55.                         sample1.def
  56.                                                                                     
  57. $(SAMPLE_DIR)\sample2.exe: $(SAMPLE_BIN)\sample2.obj
  58.    cd                   $(SAMPLE_DIR)
  59.    icc.exe $(lnkflgs)   /Fe $*.exe /Fm$*.map                                  \
  60.                         $(SAMPLE_BIN)\sample2.obj                             \
  61.                         os2386.lib                                            \
  62.                         sample2.def
  63.  
  64. $(SAMPLE_DIR)\sample3.exe: $(SAMPLE_BIN)\sample3.obj
  65.    cd                   $(SAMPLE_DIR)
  66.    icc.exe $(lnkflgs)   /Fe$*.exe /Fm$*.map                                   \
  67.                         $(SAMPLE_BIN)\sample3.obj                             \
  68.                         os2386.lib                                            \
  69.                         sample3.def
  70.  
  71. $(SAMPLE_DIR)\sample4.exe: $(SAMPLE_BIN)\sample4.obj
  72.    cd                   $(SAMPLE_DIR)
  73.    icc.exe $(lnkflgs)   /Fe$*.exe /Fm$*.map                                   \
  74.                         $(SAMPLE_BIN)\sample4.obj                             \
  75.                         os2386.lib                                            \
  76.                         sample4.def
  77.  
  78. $(SAMPLE_DIR)\sample5.exe: $(SAMPLE_BIN)\sample5.obj
  79.    cd                   $(SAMPLE_DIR)
  80.    icc.exe $(lnkflgs)   /Fe$*.exe /Fm$*.map                                   \
  81.                         $(SAMPLE_BIN)\sample5.obj                             \
  82.                         os2386.lib                                            \
  83.                         sample5.def
  84.  
  85. $(SAMPLE_DIR)\sample6.exe: $(SAMPLE_BIN)\sample6.obj
  86.    cd                   $(SAMPLE_DIR)
  87.    icc.exe $(lnkflgs)   /Fe$*.exe /Fm$*.map                                   \
  88.                         $(SAMPLE_BIN)\sample6.obj                             \
  89.                         os2386.lib                                            \
  90.                         sample6.def
  91.  
  92. $(SAMPLE_BIN)\sample1.obj: $(SAMPLE_DIR)\sample1.c 
  93.    icc.exe      $(cmpflgs) /Fo$*.obj $(SAMPLE_DIR)\sample1.c
  94.  
  95. $(SAMPLE_BIN)\sample2.obj: $(SAMPLE_DIR)\sample2.c 
  96.    icc.exe      $(cmpflgs) /Fo$*.obj $(SAMPLE_DIR)\sample2.c
  97.  
  98. $(SAMPLE_BIN)\sample3.obj: $(SAMPLE_DIR)\sample3.c 
  99.    icc.exe      $(cmpflgs) /Fo$*.obj $(SAMPLE_DIR)\sample3.c
  100.  
  101. $(SAMPLE_BIN)\sample4.obj: $(SAMPLE_DIR)\sample4.c 
  102.    icc.exe      $(cmpflgs) /Fo$*.obj $(SAMPLE_DIR)\sample4.c
  103.  
  104. $(SAMPLE_BIN)\sample5.obj: $(SAMPLE_DIR)\sample5.c 
  105.    icc.exe      $(cmpflgs) /Fo$*.obj $(SAMPLE_DIR)\sample5.c
  106.  
  107. $(SAMPLE_BIN)\sample6.obj: $(SAMPLE_DIR)\sample6.c 
  108.    icc.exe      $(cmpflgs) /Fo$*.obj $(SAMPLE_DIR)\sample6.c
  109.