home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / visbuild / calculat / cppwv13 / makefile.mak < prev   
Encoding:
Makefile  |  1996-02-19  |  6.5 KB  |  167 lines

  1. BASENAME=cppwv13
  2. #*******************************************************************************
  3. #* SAMPLE PROJECT: Calculator Makefile - builds the DLL and Import LIB         *
  4. #*                 for the nonvisual parts                                     *
  5. #*                                                                             *
  6. #* COPYRIGHT:                                                                  *
  7. #* ----------                                                                  *
  8. #* Copyright (C) International Business Machines Corp., 1992,1996.             *
  9. #*                                                                             *
  10. #* DISCLAIMER OF WARRANTIES:                                                   *
  11. #* -------------------------                                                   *
  12. #* The following [enclosed] code is sample code created by IBM                 *
  13. #* Corporation. This sample code is not part of any standard IBM product       *
  14. #* and is provided to you solely for the purpose of assisting you in the       *
  15. #* development of your applications.  The code is provided "AS IS",            *
  16. #* without warranty of any kind.  IBM shall not be liable for any damages      *
  17. #* arising out of your use of the sample code, even if they have been          *
  18. #* advised of the possibility of such damages.                                 *
  19. #*                                                                             *
  20. #*******************************************************************************
  21.  
  22. ##########################################################
  23. # Define variables for makefile
  24. ##########################################################
  25. GCPPFLAGS=/c /Ge- /Gd+ /Gm+ /Ft$(BASENAME) /Tdp /Q /DIVBSAMP_IMPORT=
  26. LINKFLAGS=/Ge- /Gd+ /Gm+ /Ft$(BASENAME) /Tdp /Q /DIVBSAMP_IMPORT=
  27.  
  28. ##########################################################
  29. # Definitions for GCPPFLAGS (compile options):
  30. ##########################################################
  31. # /c   = perform compile only
  32. # /Ge- = create a DLL (/Ge+ to create an EXE)
  33. # /Ti+ = generate debugger information
  34. # /Gd- = statically link runtime functions (why??)
  35. # /Gm+ = multi-thread capability
  36. # /Gn+ = not providing linker info about default libraries
  37. #        (in object).  All libraries must be explicitly
  38. #        specified at link time
  39. # /Ft  = generate files for template resolution and put
  40. #        them in the specified directory
  41. # /Tdp = consider all files to be C++ files
  42. # /I   = control which paths are searched when the
  43. #        compiler looks for user #include files.  These
  44. #        paths are searched before those given in the
  45. #        INCLUDE environment variable.  The format is:
  46. #             I  path[;path][;path]...
  47. ##########################################################
  48. OBJS=icalcpu.obj \
  49.                 icalcop.obj \
  50.                 icalcfnc.obj \
  51.                 ikeypad.obj \
  52.                 icalcac.obj \
  53.                 icalcsc.obj \
  54.                 icalcmc.obj \
  55.                 icalcdc.obj \
  56.                 icalcclr.obj \
  57.                 icalceql.obj \
  58.                 icalctly.obj \
  59.                 iclrdsp.obj \
  60.                 imykybrd.obj
  61.  
  62. .cpp.obj:
  63.     @echo Compiling... $(*F)... >con
  64.     icc.exe $(GCPPFLAGS) %s
  65.  
  66. all:          main
  67.  
  68. main:         $(BASENAME).dll
  69.  
  70. ##########################################################
  71. # List of dependency files for the DLL.
  72. # NOTE:  the compilation ordering is determined by the
  73. #        dependency ordering.
  74. ##########################################################
  75. $(BASENAME).dll:    $(BASENAME).def \
  76.                     $(BASENAME).lib \
  77.                     $(OBJS)
  78. ##########################################################
  79. # When any of the DLL dependency files change, invoke the
  80. # linker to rebuild the DLL.
  81. ##########################################################
  82. # /Tdp = consider all files to be C++ files
  83. # /Gm+ = multi-thread capability
  84. # /Gn+ = not providing linker info about default libraries
  85. #        (in object).  All libraries must be explicitly
  86. #        specified at link time
  87. # /Ft  = generate files for template resolution in the
  88. #        specified directory under the current directory
  89. # /B   = indicates passing linker options
  90. # /NOE =
  91. # /NOI =
  92. # /MAP =
  93. #
  94. # NOTE:  the template code doesn't get compiled until
  95. #        the link, so need to include the /Gm+ and /Gn+ options on the
  96. #        link as well as the compile (otherwise, got link errors).
  97. ##########################################################
  98.                 @echo Creating DLL>con
  99.                 icc $(LINKFLAGS) /B"/DLL /NOE /MAP" \
  100. ##########################################################
  101. # Name of the DLL being built and the MAP file to be
  102. # created by the linker.
  103. ##########################################################
  104.                 /Fe$(*F) $(BASENAME).exp $(OBJS)
  105.  
  106. ##########################################################
  107. # Generate an import library (.LIB) to allow DLL to be
  108. # linked with applications.  The DEF file is created
  109. # and used as input.
  110. ##########################################################
  111. $(BASENAME).def: $(OBJS)
  112.         @echo creating DEF file $(*F) ...>con
  113.         copy << $(BASENAME).def
  114.                 LIBRARY $(BASENAME)
  115.                 DESCRIPTION  'Visual Builder CALCULATOR DLL'
  116. EXPORTS
  117. ;       _DLL_InitTerm@12  @1 NONAME
  118. <<
  119.         cppfilt -b -p -O:1000 -n $** >> $(BASENAME).def
  120.  
  121. $(BASENAME).lib: $(OBJS) $(BASENAME).def
  122.               @echo Creating import library $(*F)...>con
  123.               ilib /Freeform /Q /GENI:$(BASENAME).lib $(BASENAME).def
  124.  
  125. ##########################################################
  126. # Statements to compile each non-visual C++ file for the Calc
  127. ##########################################################
  128. icalcpu.obj:     icalcpu.cpp  icalcpu.hpp
  129.  
  130.  
  131. icalcop.obj:     icalcop.cpp  icalcop.hpp
  132.  
  133.  
  134. icalcac.obj:     icalcac.cpp  icalcac.hpp icalcop.hpp
  135.  
  136.  
  137. icalcsc.obj:     icalcsc.cpp  icalcsc.hpp icalcop.hpp
  138.  
  139.  
  140. icalcmc.obj:     icalcmc.cpp  icalcmc.hpp icalcop.hpp
  141.  
  142.  
  143. icalcdc.obj:     icalcdc.cpp  icalcdc.hpp icalcop.hpp
  144.  
  145.  
  146. icalcfnc.obj:    icalcfnc.cpp  icalcfnc.hpp
  147.  
  148.  
  149. icalcclr.obj:    icalcclr.cpp  icalcclr.hpp icalcfnc.hpp icalcpu.hpp
  150.  
  151.  
  152. icalceql.obj:    icalceql.cpp  icalceql.hpp icalcfnc.hpp icalcpu.hpp
  153.  
  154.  
  155. icalctly.obj:    icalctly.cpp  icalctly.hpp
  156.  
  157.  
  158. ikeypad.obj:     ikeypad.cpp  ikeypad.hpp
  159.  
  160.  
  161. iclrdsp.obj:     iclrdsp.cpp iclrdsp.hpp
  162.  
  163.  
  164. imykybrd.obj:    imykybrd.cpp imykybrd.hpp
  165.  
  166.  
  167.