home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / TUTOROOT.PAK / MAKEFILE next >
Text File  |  1995-08-29  |  4KB  |  117 lines

  1. #-----------------------------------------------------------------------------
  2. # ObjectWindows - (C) Copyright 1994 by Borland International
  3. #   Tutorial application -- makefile.
  4. #
  5. # The following models may be built by defines on command line or environment:
  6. #   16-bit OWL DLL model: make          (MODEL=d, SYSTEM=WIN16 are defaults)
  7. #   16-bit large model:   make MODEL=l  (SYSTEM=WIN16 is the default)
  8. #   32-bit static model:  make SYSTEM=WIN32 MODEL=f
  9. #   32-bit OWL DLL model: make SYSTEM=WIN32 MODEL=d
  10. # Additionally set DEBUG=1 to build with debug information
  11. # Specify TARGET=step??.exe to build only one target, rather than all samples
  12. # Specify DOCVIEW=?????.obj to add more doc/view classes (must delete *.mak)
  13. #           (requires .cpp file with template(s) and .rc file with resources)
  14. #
  15. #-----------------------------------------------------------------------------
  16. MODELS=ldf                          # Allowable models
  17.  
  18. #
  19. # Build EXE(s)
  20. #
  21. EXERES = sampexe
  22. EXEALL = step01.exe step02.exe step03.exe step04.exe step05.exe step06.exe\
  23.          step07.exe step08.exe step09.exe step10.exe step11.exe step12.exe\
  24.          step13.exe step14.exe step15.exe step16.exe step17.exe
  25. EXEMAKE= $(STEP1) $(STEP2) $(STEP3) $(STEP4)  $(STEP5)  $(STEP6)\
  26.          $(STEP7) $(STEP8) $(STEP9) $(STEP10) $(STEP11) $(STEP12)\
  27.          $(STEP13) $(STEP14) $(STEP15) $(STEP16) $(CNTRL16) $(STEP17) $(CNTRL17)
  28.  
  29. NORES = $(EXERULE:sampexe.res=)
  30. STEP1 = $(NORES:sampexe=step01)
  31. STEP2 = $(NORES:sampexe=step02)
  32. STEP3 = $(NORES:sampexe=step03)
  33. STEP4 = $(NORES:sampexe=step04)
  34. STEP5 = $(EXERULE:sampexe=step05)
  35. STEP6 = $(STEP5:step05=step06)
  36. STEP7 = $(STEP5:step05=step07)
  37. STEP8 = $(STEP5:step05=step08)
  38. STEP9 = $(STEP5:step05=step09)
  39. STEP10= $(STEP5:step05=step10)
  40. STEP11= $(STEP5:step05=step11)
  41. STEPV=  $(EXERULE:sampexe.obj=sampexe.obj sampexedv.obj $(DOCVIEW))
  42. STEPW = $(STEPV:sampexe.res=sampexe.res sampexedv.res $(DOCVIEW:.obj=.res))
  43. STEP12= $(STEPW:sampexe=step12)
  44. STEP13= $(STEPW:sampexe=step13)
  45. STEP14= $(STEPW:sampexe=step14)
  46. STEP15= $(STEPW:sampexe=step15)
  47. STEP16= $(STEPW:sampexe=step16)
  48. CNTRL16= $(STEP1:step01=cntrl16)
  49. STEP17= $(STEPW:sampexe=step17)
  50. CNTRL17= $(STEP1:step01=cntrl17)
  51.  
  52. RULES = ^
  53. step16.obj: cntrl16.exe^
  54. step17.obj: cntrl17.exe
  55.  
  56.  
  57. #
  58. # Build DLL Server(s)
  59. #
  60. DLL    = sampdll
  61. OBJDLL = sampdllu.obj sampdlldu.obj
  62. RESDLL = sampdll.res sampdlldv.res
  63.  
  64. STEP15U = $(DLLRULE:sampdll=step15) ^
  65. step15u.obj : step15.cpp ^
  66.   $(BCC) -ostep15u.obj step15.cpp ^
  67. step15du.obj : step15dv.cpp ^
  68.   $(BCC) -ostep15du.obj step15dv.cpp ^
  69.  
  70. STEP16U = $(STEP15U:step15=step16)
  71. STEP17U = $(STEP15U:step15=step17)
  72.  
  73. #
  74. # Typically DLLs are built before EXEs - However, this does not have
  75. # to be the case for these samples since non of the EXEs depend on
  76. # the DLLs. Hence, if no TARGET is specified, we build the DLLs last
  77. # using MAKEFILE.GEN's TARGETS macro. This allows a more logical
  78. # build order [step01, step02, step03,...]
  79. #
  80. !if !$d(TARGET)
  81. TARGETS= cfgdllsrvr step15.dll step16.dll step17.dll makcln
  82. RULES  = $(RULES) $(STEP15U) $(STEP16U) $(STEP17U)^
  83.  ^
  84. cfgdllsrvr: ^
  85.   @copy &&| ^
  86. -I$(INCLUDEPATH) ^
  87. -c $(CFLAGSD)    ^
  88. -w $(CDIAG) $(CPCHD) $(CCFDLL) ^
  89. | $(CFGFILE) >NUL ^
  90.  ^
  91. makcln: ^
  92.   @del $(MAKEFILE)
  93.  
  94. #
  95. # Prevent MAKEFILE.GEN from building DLL Servers via DLLALL/DLLMAKE 
  96. #
  97. DLLALL = 
  98. DLLMAKE= 
  99.  
  100.  
  101. !else
  102.  
  103. #
  104. # A TARGET was specified
  105. #
  106. DLLALL = step15.dll step16.dll step17.dll
  107. DLLMAKE= $(STEP15U) $(STEP16U) $(STEP17U)
  108.  
  109. TARGETS= makcln
  110. RULES  = $(RULES) ^
  111.  ^
  112. makcln: ^
  113.   @del $(MAKEFILE)
  114. !endif
  115.  
  116. !include $(BCEXAMPLEDIR)\owlocfmk.gen
  117.