home *** CD-ROM | disk | FTP | other *** search
/ PC Press 1997 July / Sezamfile97_2.iso / windows / program / activex / axtsamp.exe / TSBRANCH.EXE / STOCLIEN / MAKEFILE < prev    next >
Text File  |  1996-12-29  |  7KB  |  207 lines

  1. #/*+=========================================================================
  2. #  File:       MAKEFILE
  3. #
  4. #  Summary:    Makefile for building the STOCLIEN.EXE binary.  STOCLIEN
  5. #              is a Win32 EXE that acts as a client of the STOSERVE
  6. #              DLL server to create and manipulate a COPaper COM object.
  7. #
  8. #              STOCLIEN specifically works with the STOSERVE.DLL produced
  9. #              in the STOSERVE lesson (in sibling directory STOSERVE).
  10. #              This Makefile therefore depends on a prior build (and the
  11. #              resultant registration) of the STOSERVE.DLL server.
  12. #
  13. #              This Makefile creates a subdirectory (TEMP) for the
  14. #              .OBJ and .RES files used during the build process.
  15. #
  16. #              For a comprehensive tutorial code tour of STOCLIEN's
  17. #              contents and offerings see the tutorial STOCLIEN.HTM
  18. #              file. For more specific technical details see the comments
  19. #              dispersed throughout the STOCLIEN source code.
  20. #
  21. #              See also STOSERVE.HTM (in the main tutorial directory)
  22. #              more details on the STOSERVE server and how it works with
  23. #              for STOCLIEN.EXE itself.
  24. #
  25. #              In general, to set up your system to build and test the
  26. #              Win32 code samples in this ActiveX Tutorial series, see the
  27. #              global TUTORIAL.HTM file for details.  This MAKEFILE is
  28. #              Microsoft NMAKE compatible and the 'debug' build can be
  29. #              achieved by simply issuing the NMAKE command in the
  30. #              command prompt window.
  31. #
  32. #  Builds:     STOCLIEN.EXE.
  33. #
  34. #  Origin:     6-10-96: atrent - Editor-inheritance from CONCLIEN code
  35. #              sample makefile.
  36. #
  37. #--Usage:-------------------------------------------------------------------
  38. #  NMAKE Options
  39. #
  40. #  Use the table below to determine the additional options for NMAKE to
  41. #  generate various application debugging, profiling and performance tuning
  42. #  information.
  43. #
  44. #  Application Information Type         Invoke NMAKE
  45. #  ----------------------------         ------------
  46. #  For No Debugging Info                nmake nodebug=1
  47. #  For Working Set Tuner Info           nmake tune=1
  48. #  For Call Attributed Profiling Info   nmake profile=1
  49. #
  50. #  Note: The three options above are mutually exclusive (you may use only
  51. #        one to compile/link the application).
  52. #
  53. #  Note: creating the environment variables NODEBUG, TUNE, and PROFILE
  54. #        is an alternate method to setting these options via the nmake
  55. #        command line.
  56. #
  57. #  Additional NMAKE Options             Invoke NMAKE
  58. #  ----------------------------         ------------
  59. #  For No ANSI NULL Compliance          nmake no_ansi=1
  60. #    (ANSI NULL is defined as PVOID 0)
  61. #  To compile for Unicode               nmake unicode=1
  62. #    (Default is ANSI)
  63. #  To clean up temporary binaries       nmake clean
  64. #  To clean up all generated files      nmake cleanall
  65. #
  66. #---------------------------------------------------------------------------
  67. #  This file is part of the Microsoft ActiveX Tutorial Code Samples.
  68. #
  69. #  Copyright (C) Microsoft Corporation, 1997.  All rights reserved.
  70. #
  71. #  This source code is intended only as a supplement to Microsoft
  72. #  Development Tools and/or on-line documentation.  See these other
  73. #  materials for detailed information regarding Microsoft code samples.
  74. #
  75. #  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  76. #  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  77. #  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  78. #  PARTICULAR PURPOSE.
  79. #=========================================================================+*/
  80.  
  81. #  WIN32.MAK should be included at the front of every Win32 makefile.
  82. #
  83. #  Define APPVER = [ 3.50 | 3.51 | 4.0 ] prior to including win32.mak to get
  84. #  build time checking for version dependencies and to mark the executable
  85. #  with version information.
  86. #
  87. #  Define TARGETOS = [ WIN95 | WINNT | BOTH ] prior to including win32.mak
  88. #  to get some build time checking for platform dependencies.
  89. #
  90. APPVER=4.0
  91. TARGETOS=BOTH
  92. !include <win32.mak>
  93.  
  94. # Assign the main program name macro.
  95. PGM=stoclien
  96.  
  97. # Use a temporary sub-directory to store intermediate
  98. # binary files like *.obj, *.res, *.map, etc.
  99. TDIR = TEMP
  100.  
  101. # The sibling ..\INC and ..\LIB directories are added to the front of
  102. # the INCLUDE and LIB macros to inform the compiler and linker of
  103. # these application-specific locations for include and lib files.
  104. INCLUDE=..\inc;$(INCLUDE)
  105. LIB=..\lib;$(LIB)
  106.  
  107. LINK = $(link)
  108.  
  109. # If UNICODE=1 is defined then define UNICODE during Compiles.
  110. # The default is to compile with ANSI for running under both
  111. # Win95 and WinNT.
  112. !IFDEF UNICODE
  113. LINKFLAGS = $(ldebug)
  114. CDBG=$(cdebug) -DUNICODE -D_UNICODE
  115. RCFLAGS = -DWIN32 -DRC_INCLUDE -DUNICODE
  116. !ELSE
  117. LINKFLAGS = $(ldebug)
  118. CDBG=$(cdebug)
  119. RCFLAGS = -DWIN32 -DRC_INCLUDE
  120. !ENDIF
  121.  
  122. # If NODEBUG is not defined then define DEBUG during Compiles.
  123. # The default is to compile with debug symbols in the binaries.
  124. !IFNDEF NODEBUG
  125. CDBG = $(CDBG) -DDEBUG
  126. RCFLAGS = $(RCFLAGS) -DDEBUG
  127. !ENDIF
  128.  
  129. # APPLIBS are libraries used by this application that are outside
  130. # of its indigenous file set and are needed during the final link.
  131. APPLIBS = apputil.lib urlmon.lib
  132.  
  133. # PGMOBJS is a macro that defines the object files for this application.
  134. PGMOBJS = $(TDIR)\$(PGM).obj $(TDIR)\guipaper.obj $(TDIR)\sink.obj \
  135.           $(TDIR)\papfile.obj
  136.  
  137. # The final target.
  138. all: tempdir output
  139.  
  140. # Make the temporary work sub-directory.
  141. tempdir:
  142.   -mkdir $(TDIR)
  143.  
  144. # The actual output products.
  145. output: $(PGM).exe
  146.  
  147. # Compilation/Dependency rules for the main source files.
  148. $(TDIR)\$(PGM).obj: $(PGM).cpp $(PGM).h guipaper.h
  149.   $(cc) $(cvars) $(cflags) $(CDBG) -Fo$@ $(PGM).cpp
  150.  
  151. $(TDIR)\guipaper.obj: guipaper.cpp guipaper.h $(PGM).h sink.h
  152.   $(cc) $(cvars) $(cflags) $(CDBG) -Fo$@ guipaper.cpp
  153.  
  154. $(TDIR)\sink.obj: sink.cpp sink.h guipaper.h
  155.   $(cc) $(cvars) $(cflags) $(CDBG) -Fo$@ sink.cpp
  156.  
  157. $(TDIR)\papfile.obj: papfile.cpp papfile.h
  158.   $(cc) $(cvars) $(cflags) $(CDBG) -Fo$@ papfile.cpp
  159.  
  160. # Compile the resources.
  161. $(TDIR)\$(PGM).res: $(PGM).rc $(PGM).ico $(PGM).h
  162.   rc $(RCFLAGS) -r -fo$@ $(PGM).rc
  163.  
  164. # Link the object and resource binaries into the final target binary.
  165. $(PGM).exe: $(PGMOBJS) $(TDIR)\$(PGM).res
  166.   $(LINK) @<<
  167.     $(LINKFLAGS)
  168.     -out:$@
  169.     -map:$(TDIR)\$*.map
  170.     $(PGMOBJS)
  171.     $(TDIR)\$*.res
  172.     $(olelibs) $(APPLIBS)
  173. <<
  174.  
  175. # Target to clean up temporary binaries.
  176. clean:
  177.   -del $(PGM).pdb
  178.   -deltree /y $(TDIR)
  179.   -rmdir /s /q $(TDIR)
  180.  
  181. # Target to clean up all generated files.
  182. cleanall:
  183.   -del *.exe
  184.   -del *.dll
  185.   -del *.lib
  186.   -del *.exp
  187.   -del *.obj
  188.   -del *.res
  189.   -del *.map
  190.   -del *.pdb
  191.   -del *.vcp
  192.   -del *.aps
  193.   -del *.pch
  194.   -del *.sbr
  195.   -del *.bsc
  196.   -del *.mdp
  197.   -del *.ncb
  198.   -del *.mak
  199.   -del makefile.exe
  200.   -del resource.h
  201.   -deltree /y windebug
  202.   -rmdir /s /q windebug
  203.   -deltree /y winrel
  204.   -rmdir /s /q winrel
  205.   -deltree /y $(TDIR)
  206.   -rmdir /s /q $(TDIR)
  207.