home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / visbuild / rapsheet / cppwv23 / makefile.mak < prev    next >
Encoding:
Makefile  |  1996-02-11  |  6.5 KB  |  151 lines

  1. BASENAME=cppwv23
  2. #*******************************************************************************
  3. #* SAMPLE PROJECT: Police Rap Sheet 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+ = dynamically link runtime functions
  35. # /Gm+ = multi-thread capability
  36. # /Ft  = generate files for template resolution and put
  37. #        them in the specified directory
  38. # /Tdp = consider all files to be C++ files
  39. ##########################################################
  40.  
  41. ##########################################################
  42. # Definitions for LINKFLAGS (link options):
  43. ##########################################################
  44. # See the definitions for the compile options
  45. ##########################################################
  46.  
  47. ##########################################################
  48. # List of the .OBJ files
  49. ##########################################################
  50. OBJS=querydb.obj \
  51.      irsltrec.obj \
  52.      iaddrrec.obj \
  53.      ialsrec.obj \
  54.      iarstrec.obj \
  55.      isusrec.obj \
  56.      ialias.obj \
  57.      iarrest.obj \
  58.      iperson.obj \
  59.      isuspect.obj \
  60.      ialsrmgr.obj \
  61.      iarsrmgr.obj \
  62.      iadrrmgr.obj \
  63.      isusrmgr.obj
  64.  
  65. ##########################################################
  66. # When any of the OBJ dependency files change, invoke the
  67. # compiler to recompile them.
  68. ##########################################################
  69. .cpp.obj:
  70.     @echo Compiling... $(*F)... >con
  71.     icc.exe $(GCPPFLAGS) %s
  72.  
  73.  
  74. all:          main
  75.  
  76. main:         $(BASENAME).dll
  77.  
  78. ##########################################################
  79. # List of dependency files for the DLL.
  80. ##########################################################
  81. $(BASENAME).dll:    $(BASENAME).def \
  82.                     $(BASENAME).lib \
  83.                     $(OBJS)
  84. ##########################################################
  85. # When any of the DLL dependency files change, invoke the
  86. # linker to rebuild the DLL.
  87. ##########################################################
  88.                 @echo Creating DLL>con
  89.                 icc $(LINKFLAGS) /B"/DLL /NOE /MAP /DEBUG" \
  90.                 /Fe$(*F) $(BASENAME).exp $(OBJS)
  91.  
  92. ##########################################################
  93. # Generate a .DEF file
  94. ##########################################################
  95. $(BASENAME).def: $(OBJS)
  96.         @echo creating DEF file $(*F) ...>con
  97.         copy << $(BASENAME).def
  98.                 LIBRARY $(BASENAME)
  99.                 DESCRIPTION  'Visual Builder Rap Sheet DLL'
  100. EXPORTS
  101. ;       _DLL_InitTerm@12  @1 NONAME
  102. <<
  103.         cppfilt -b -p -O:1000 -n $** >> $(BASENAME).def
  104.  
  105. ##########################################################
  106. # Generate an import library (.LIB) to allow DLLs to be
  107. # linked with applications.  The DEF file is used as input.
  108. ##########################################################
  109. $(BASENAME).lib: $(OBJS) $(BASENAME).def
  110.               @echo Creating import library $(*F)...>con
  111.               ilib /Freeform /Q /GENI:$(BASENAME).lib $(BASENAME).def
  112.  
  113. ##########################################################
  114. # Statements to compile each C/C++ file for the non-visual
  115. # parts in the sample Rap Sheet application.
  116. ##########################################################
  117. querydb.obj:  querydb.cpp  {$(INCLUDE)}querydb.hpp {$(INCLUDE)}irsltrec.hpp \
  118.               {$(INCLUDE)}isusrec.hpp {$(INCLUDE)}rap.h
  119.  
  120. irsltrec.obj: irsltrec.cpp  {$(INCLUDE)}irsltrec.hpp
  121.  
  122. isusrec.obj:  isusrec.cpp  {$(INCLUDE)}isusrec.hpp
  123.  
  124. iaddrrec.obj: iaddrrec.cpp  {$(INCLUDE)}iaddrrec.hpp
  125.  
  126. ialsrec.obj:  ialsrec.cpp  {$(INCLUDE)}ialsrec.hpp
  127.  
  128. iarstrec.obj: iarstrec.cpp  {$(INCLUDE)}iarstrec.hpp
  129.  
  130. ialias.obj:   ialias.cpp {$(INCLUDE)}ialias.hpp
  131.  
  132. iarrest.obj:  iarrest.cpp {$(INCLUDE)}iarrest.hpp {$(INCLUDE)}rap.h
  133.  
  134. iperson.obj:  iperson.cpp {$(INCLUDE)}iperson.hpp {$(INCLUDE)}iadd.hpp \
  135.               {$(INCLUDE)}ialias.hpp {$(INCLUDE)}rap.h
  136.  
  137. isuspect.obj: isuspect.cpp {$(INCLUDE)}isuspect.hpp {$(INCLUDE)}iarrest.hpp
  138.  
  139. ialsrmgr.obj: ialsrmgr.cpp {$(INCLUDE)}ialsrmgr.hpp {$(INCLUDE)}irsltrec.hpp \
  140.               {$(INCLUDE)}ialsrec.hpp {$(INCLUDE)}ialias.hpp {$(INCLUDE)}querydb.hpp
  141.  
  142. iarsrmgr.obj: iarsrmgr.cpp {$(INCLUDE)}iarsrmgr.hpp {$(INCLUDE)}irsltrec.hpp \
  143.               {$(INCLUDE)}iarstrec.hpp {$(INCLUDE)}iarrest.hpp {$(INCLUDE)}querydb.hpp
  144.  
  145. iadrrmgr.obj: iadrrmgr.cpp {$(INCLUDE)}iadrrmgr.hpp {$(INCLUDE)}irsltrec.hpp \
  146.               {$(INCLUDE)}iaddrrec.hpp {$(INCLUDE)}iadd.hpp {$(INCLUDE)}querydb.hpp
  147.  
  148. isusrmgr.obj: isusrmgr.cpp  {$(INCLUDE)}isusrmgr.hpp {$(INCLUDE)}irsltrec.hpp \
  149.               {$(INCLUDE)}isusrec.hpp {$(INCLUDE)}isuspect.hpp {$(INCLUDE)}querydb.hpp \
  150.               {$(INCLUDE)}iadd.hpp
  151.