Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

198 lines
5.4 KiB

  1. # ============================================================================
  2. # File: M A K E F I L E
  3. #
  4. # NMAKE description file for the SIMPSVR (in-place server) sample
  5. #
  6. # This is a part of the Microsoft OLE 2.0 sample library.
  7. # Copyright (C) Microsoft Corporation, 1992-1993. All Rights Reserved.
  8. # ============================================================================
  9. #
  10. # Usage: NMAKE (build DEBUG exe)
  11. # NMAKE DEBUG=0 (build RELEASE exe)
  12. #
  13. # ============================================================================
  14. DEBUG=1
  15. WIN32=1
  16. MACHINE_TYPE=i386
  17. APPNAME=simpsvr
  18. LANG=USA
  19. OPSYS=NT1X
  20. EXPORT=1
  21. #############################################################################
  22. # The following needs to be changed when we ship the sample app. Plus the
  23. # locations of simpsvr.exe and the UI libraries. (Look for D_LIBS, R_LIBS,
  24. # and $(APPNAME).exe) Also, we don't need the EXPORT above.
  25. #
  26. !if "$(OPSYS)"=="NT1X"
  27. OBJDIR=OBJi1d
  28. # Location for NT SDK headers and libraries
  29. NT_INC_DIR=$(IMPORT)\$(OPSYS)\h\sdk;$(IMPORT)\$(OPSYS)\h\sdk\crt;
  30. NT_LIB_DIR=$(IMPORT)\$(OPSYS)\lib\$(OBJDIR)
  31. !else
  32. OBJDIR=OBJidd
  33. # Location for Chicago SDK headers and libraries
  34. NT_INC_DIR=$(IMPORT)\CHICAGO\h;$(IMPORT)\CHICAGO\h\crt;
  35. NT_LIB_DIR=$(IMPORT)\CHICAGO\lib
  36. !endif
  37. # path for OLE headers and libraries
  38. !if "$(EXPORT)"=="1"
  39. OLE232_INC_DIR=$(CAIROLE)\h\export;$(NT_INC_DIR)
  40. !else
  41. OLE232_INC_DIR=$(CAIROLE)\h;$(CAIROLE)\common;$(NT_INC_DIR)
  42. !endif # EXPORT
  43. OLE232_LIB_DIR=$(CAIROLE)\ilib\$(OBJDIR);$(NT_LIB_DIR)
  44. # location of the UI libraries
  45. OLE2UI_DIR=..\ole2ui
  46. OLE2UI_LIB_DIR=..\ole2ui\$(OBJDIR)
  47. # tools that we are using in this build
  48. CL=$(IMPORT)\n386\bin\cl
  49. LINK=$(COMMON)\bin\link
  50. RC=$(COMMON)\bin\rc
  51. # Ensure that "nmake clean" will pick this file to do the cleaning.
  52. NMAKE=nmake -f makefile.new
  53. # The location of resources from the UI library
  54. RES=RESOURCE
  55. #############################################################################
  56. GOAL: set_vars $(APPNAME).exe
  57. PCH=pre
  58. SRCS=$(PCH).cpp app.cpp $(APPNAME).cpp icf.cpp iec.cpp ioipo.cpp ips.cpp \
  59. doc.cpp ido.cpp ioipao.cpp ioo.cpp obj.cpp
  60. INCS=$(PCH).h $(APPNAME).h obj.h ioipao.h ioipo.h ioo.h ips.h ido.h iec.h \
  61. app.h doc.h
  62. OBJS=$(SRCS:cpp=obj)
  63. #############################################################################
  64. #
  65. # Set the resource directories. These are the directories where we pull our
  66. # resources from. You may need to change these to point to the proper location
  67. # of the OLE2UI resources, or just copy all the .DLG and .BMP files into your
  68. # project's directory.
  69. #
  70. !if "$(RES_DIRS)"==""
  71. RES_DIRS = $(OLE2UI_DIR)\$(RES)\STATIC;$(OLE2UI_DIR)\$(RES)\$(LANG)
  72. !endif
  73. !if "$(WIN32)"=="1"
  74. #
  75. # 32-bit C/C++ Compiler
  76. #
  77. G_LIBS=advapi32.lib crtdll.lib gdi32.lib kernel32.lib user32.lib ntdll.lib \
  78. ole232.lib storag32.lib compob32.lib
  79. WIN32FLAGS= /DUNICODE /D_WINDOWS /D_UNICODE /DINC_OLE2 /D_MT /DSTRICT \
  80. /Di386=1 /D_X86_=1
  81. # For Chicago Build
  82. !if "$(OPSYS)"=="DOS"
  83. WIN32FLAGS=$(WIN32FLAGS) /D_INC_OLE /DWIN32=200 /D_CHICAGO_=200
  84. !else
  85. WIN32FLAGS=$(WIN32FLAGS) /DWIN32=100
  86. !endif
  87. G_CPPFLAGS=/G4f /W3 /Zp8 /Gz $(WIN32FLAGS) /Gys /Yu$(PCH).h
  88. D_CPPFLAGS=/Z7 /Od /D_DEBUG /DDBG=1
  89. R_CPPFLAGS=/O1 /Gs /Ogit
  90. G_LINKFLAGS=/NOD /MACHINE:$(MACHINE_TYPE) /SECTION:.rsrc,r \
  91. /SECTION:.guids,r /merge:.CRT=.data /STACK:16384
  92. D_LINKFLAGS=/DEBUGTYPE:both,fixup /DEBUG:mapped,full
  93. R_LINKFLAGS=/RELEASE
  94. D_LIBS=$(OLE2UI_DIR)\$(OBJDIR)\ole2uixd.lib #..\lib\moleuicd
  95. R_LIBS=$(OLE2UI_DIR)\$(OBJDIR)\ole2uix.lib #..\lib\moleuic
  96. !else
  97. #
  98. # 16-bit C/C++ Compiler
  99. #
  100. G_LIBS=ole2 compobj storage libw shell
  101. G_CPPFLAGS=/AM /G2 /W3 /Zp /Yu$(PCH).h /GA /GEs
  102. D_CPPFLAGS=/Zi /Od /f /D_DEBUG
  103. R_CPPFLAGS=/O1 /Gs
  104. G_LINKFLAGS=/NOD /ONERROR:NOEXE /NOE /BATCH /STACK:16384
  105. D_LINKFLAGS=/COD
  106. R_LINKFLAGS=/FAR /PACKC
  107. D_LIBS=mlibcew ..\lib\moleuicd
  108. R_LIBS=mlibcew ..\lib\moleuic
  109. !endif
  110. !if "$(DEBUG)"=="0"
  111. CPPFLAGS=$(G_CPPFLAGS) $(R_CPPFLAGS)
  112. LINKFLAGS=$(G_LINKFLAGS) $(R_LINKFLAGS)
  113. LIBS=$(R_LIBS) $(G_LIBS)
  114. !else
  115. CPPFLAGS=$(G_CPPFLAGS) $(D_CPPFLAGS)
  116. LINKFLAGS=$(G_LINKFLAGS) $(D_LINKFLAGS)
  117. LIBS=$(D_LIBS) $(G_LIBS)
  118. !endif #//DEBUG
  119. #############################################################################
  120. set_vars:
  121. set INCLUDE=$(OLE232_INC_DIR);$(OLE2UI_DIR);$(INCLUDE)
  122. set LIB=$(OLE232_LIB_DIR);$(OLE2UI_LIB_DIR);$(LIB)
  123. #############################################################################
  124. $(APPNAME).exe: $(OBJS) $(APPNAME).def $(APPNAME).res
  125. !if "$(WIN32)"=="1"
  126. $(LINK) $(LINKFLAGS) @<<
  127. $(OBJS: = ^
  128. )
  129. $(LIBS: = ^
  130. )
  131. $(APPNAME).res
  132. /MAP:$(APPNAME).map
  133. /OUT:$(APPNAME).exe
  134. <<
  135. !else
  136. $(LINK) $(LINKFLAGS) @<<
  137. $(OBJS: = +^
  138. ),
  139. $(APPNAME),
  140. $(APPNAME),
  141. $(LIBS: = +^
  142. ),
  143. $(APPNAME);
  144. <<
  145. $(RC) /k /t $(APPNAME).res
  146. !endif
  147. $(PCH).obj: $(INCS) $(PCH).cpp
  148. $(NMAKE) clean
  149. $(CL) $(CPPFLAGS) /Yc$(PCH).h /c $(PCH).cpp
  150. .cpp.obj:
  151. $(CL) @<<
  152. $(CPPFLAGS) /c $<
  153. <<
  154. $(APPNAME).res: resource.h $(APPNAME).h
  155. $(RC) /r /I$(RES_DIRS) $(APPNAME).rc
  156. clean:
  157. if exist $(APPNAME).exe erase $(APPNAME).exe
  158. if exist *.pch erase *.pch
  159. if exist *.obj erase *.obj
  160. if exist *.sbr erase *.sbr
  161. if exist *.pdb erase *.pdb
  162. if exist *.map erase *.map
  163. if exist *.res erase *.res
  164. if exist *.aps erase *.aps
  165. if exist *.bsc erase *.bsc
  166. if exist *.wsp erase *.wsp
  167. if exist *.vcw erase *.vcw
  168.