home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / visbuild / vbsample / cppwv03.mak next >
Encoding:
Text File  |  1996-02-20  |  5.5 KB  |  199 lines

  1. BASENAME=cppwv03
  2. # C++ cppov03 DLL - Makefile ($(BASENAME).mak)
  3. #
  4. # COPYRIGHT:
  5. #   IBM(R) VisualAge(TM) for C++                                               *
  6. #   (C) Copyright International Business Machines Corporation 1991, 1996       *
  7. #   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  8. #   US Government Users Restricted Rights - Use, duplication, or disclosure
  9. #   restricted by GSA ADP Schedule Contract with IBM Corp.
  10. #
  11. #   This program will not run in DOS mode.
  12. #
  13. # DISCLAIMER OF WARRANTIES:
  14. #   The following [enclosed] code is sample code created by IBM
  15. #   Corporation.  This sample code is not part of any standard IBM product
  16. #   and is provided to you solely for the purpose of assisting you in the
  17. #   development of your applications.  The code is provided "AS IS",
  18. #   without warranty of any kind.  IBM shall not be liable for any damages
  19. #   arising out of your use of the sample code, even if they have been
  20. #   advised of the possibility of such damages.
  21. #
  22. # Define variables for makefile
  23. #
  24.  
  25. #  These are the compile stmts normally used. They would normally be in your TOOLS.INI
  26. GCPPFLAGS=/Ge- /Gd+ /Gm+ /Tdp /I. /Q /O+ /DIVB_IMPORT=
  27. #GCPPFLAGS=/Ge- /Gd+ /Gm+ /Tdp /I. /Q /Ti /DIC_TRACE_DEVELOP /DIVB_IMPORT=
  28. STATICFLAGS=/c /Ge- /O+ /Gm+ /Tdp /I. /Ft- /Q
  29. DEBUGFLAGS=/Ge- /Gd+ /Gm+ /Tdp /I. /Q /Ti /Tm+ /DIC_TRACE_DEVELOP /DIVB_IMPORT=
  30. DLLDIR=.
  31. LIBDIR=.
  32. OBJDIR=.
  33. SOBJDIR=static
  34. DOBJDIR=debug
  35. GLINK=icc
  36.  
  37. OBJS=ivbdtype.obj \
  38.      ivbbool.obj \
  39.      ivblong.obj \
  40.      ivbulong.obj \
  41.      ivbshort.obj \
  42.      ivbushrt.obj \
  43.      ivbdbl.obj \
  44.      ivbstrng.obj \
  45.      iordrrec.obj \
  46.      irecord.obj \
  47.      iadd.obj \
  48.      icust.obj \
  49.      icompany.obj \
  50.      ivbland.obj \
  51.      ivblor.obj
  52.  
  53.  
  54. .cpp.obj:
  55.     @echo Compiling... $(*F)... >con
  56.     icc.exe $(GCPPFLAGS) /C %s
  57.     icc.exe $(STATICFLAGS) /Fo"static\%|dpfF.obj" /C %s
  58.     icc.exe $(DEBUGFLAGS) /Ftdebug\tempinc /Fo"debug\%|dpfF.obj" /C %s
  59.  
  60. # This allowed us to update the lib and include paths.
  61. LIB=$(LIB)$(AVLLIB);
  62. INCLUDE=$(INCLUDE)$(AVLINC);
  63.  
  64. all: lib dll slib debug
  65.  
  66. dll: $(DLLDIR)\$(BASENAME).dll
  67.  
  68. lib: $(LIBDIR)\$(BASENAME)i.lib
  69.  
  70. slib: $(LIBDIR)\$(BASENAME).lib $(LIBDIR)\$(BASENAME)o.lib
  71.  
  72. debug: debug\$(BASENAME).dll
  73.  
  74. $(BASENAME).def: $(OBJS)
  75.         @echo Creating def file $(*F) ...>con
  76.         copy << $(BASENAME).def
  77.         LIBRARY $(BASENAME)
  78.         DESCRIPTION ' Visual Builder Win Sample DLL'
  79. EXPORTS
  80. ;       _DLL_InitTerm@12  @1 NONAME
  81. <<
  82.         cppfilt -b -p -O:1000 -n $** >> $(BASENAME).def
  83.  
  84. $(LIBDIR)\$(BASENAME)i.lib: $(OBJS) $(BASENAME).def
  85.         @echo Creating import library $(*F)...>con
  86.         ilib /Freeform /Q /GENI:$(BASENAME).lib $(BASENAME).def
  87.         copy $(BASENAME).lib $(BASENAME)i.lib
  88.         erase $(BASENAME).lib
  89.  
  90. $(DLLDIR)\$(BASENAME).dll:  \
  91. #               ..\ibmdll\copyr3v0.exe \
  92.                 $(BASENAME).def \
  93.                 $(LIBDIR)\$(BASENAME)i.lib
  94.         @echo Linking $(*F)...>con
  95.         icc /B"/STUB:COPYV3R5.EXE /DLL /NOE" $(GCPPFLAGS) /Fe$@ $(BASENAME).exp $(OBJS)
  96.  
  97. debug\$(BASENAME).dll:  \
  98. #               ..\ibmdll\copyr3v0.exe \
  99.                 $(BASENAME).def \
  100.                 $(LIBDIR)\$(BASENAME)i.lib
  101.         @echo Linking debug dll $(*F)...>con
  102.         cd debug
  103.         copy ..\$(BASENAME)i.lib
  104.         icc /B"/STUB:COPYV3R5.EXE /DLL /NOE" $(GCPPFLAGS) /Fe$(*F) ..\$(BASENAME).exp $(OBJS)
  105.         cd ..
  106.  
  107. $(LIBDIR)\$(BASENAME).lib: $(OBJS)
  108.         @echo Creating Static Library $(*F) ...>con
  109.         erase $@
  110.         cd static
  111.         ILIB /NOFREEFORM /Q ..\$(BASENAME).lib $(OBJS) , $(@B).lst
  112.         cd ..
  113.  
  114. $(LIBDIR)\$(BASENAME)o.lib: $(OBJS)
  115.         @echo Creating dll Library $(*F)...>con
  116.         erase $@
  117.         ILIB /NOFREEFORM /Q $@ $(OBJS) , $(@B).lst
  118. #
  119. #       Statements to compile iadd
  120. #
  121. $(OBJDIR)\iadd.obj: iadd.cpp ..\shipibm\iadd.hpp
  122.  
  123. #
  124. #       Statements to compile icust
  125. #
  126. $(OBJDIR)\icust.obj: icust.cpp ..\shipibm\icust.hpp
  127.  
  128. #
  129. #       Statements to compile icompany
  130. #
  131. $(OBJDIR)\icompany.obj: icompany.cpp ..\shipibm\icompany.hpp
  132.  
  133. #
  134. #       Statements to compile iordrrec
  135. #
  136. $(OBJDIR)\iordrrec.obj: iordrrec.cpp ..\shipibm\iordrrec.hpp
  137.  
  138. #
  139. #       Statements to compile irecord
  140. #
  141. $(OBJDIR)\irecord.obj: irecord.cpp ..\shipibm\irecord.hpp
  142.  
  143. #
  144. #       Statements to compile ivbdtype
  145. #
  146. $(OBJDIR)\ivbdtype.obj: ivbdtype.cpp ..\shipibm\ivbdtype.hpp
  147.  
  148. #
  149. #       Statements to compile ivbbool
  150. #
  151. $(OBJDIR)\ivbbool.obj: ivbbool.cpp ..\shipibm\ivbbool.hpp
  152.  
  153. #
  154. #       Statements to compile ivblong
  155. #
  156. $(OBJDIR)\ivblong.obj: ivblong.cpp ..\shipibm\ivblong.hpp
  157.  
  158. #
  159. #       Statements to compile ivbdbl
  160. #
  161. $(OBJDIR)\ivbdbl.obj: ivbdbl.cpp ..\shipibm\ivbdbl.hpp
  162.  
  163. #
  164. #       Statements to compile ivbulong
  165. #
  166. $(OBJDIR)\ivbulong.obj: ivbulong.cpp ..\shipibm\ivbulong.hpp
  167.  
  168. #
  169. #       Statements to compile ivbshort
  170. #
  171. $(OBJDIR)\ivbshort.obj: ivbshort.cpp ..\shipibm\ivbshort.hpp
  172.  
  173. #
  174. #       Statements to compile ivbushrt
  175. #
  176. $(OBJDIR)\ivbushrt.obj: ivbushrt.cpp ..\shipibm\ivbushrt.hpp
  177.  
  178. #
  179. #       Statements to compile ivbland
  180. #
  181. $(OBJDIR)\ivbland.obj: ivbland.cpp ..\shipibm\ivbland.hpp
  182.  
  183. #
  184. #       Statements to compile ivblor
  185. #
  186. $(OBJDIR)\ivblor.obj:  ivblor.cpp ..\shipibm\ivblor.hpp
  187.  
  188. #
  189. #       Statements to compile ivbstrng
  190. #
  191. $(OBJDIR)\ivbstrng.obj: ivbstrng.cpp ..\shipibm\ivbstrng.hpp
  192.  
  193. clean:
  194.         $(ERASE) $(DLLDIR)\$(BASENAME).dll
  195.         $(ERASE) $(LIBDIR)\$(BASENAME).lib
  196.         $(ERASE) $(LIBDIR)\$(BASENAME)I.lib
  197.         erase $(OBJS)
  198.         $(ERASE) $(TEMPINCOBJDIR)\* /N
  199.