makefile 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #############################################################################
  2. #
  3. # Makefile for MSRGuard.exe
  4. #
  5. # Environment variable Requirements:
  6. #
  7. # INCLUDE=foo // can be set to anything, must be set
  8. # PATH= // must have proper nmake on path
  9. # FEDROOT=<path> // MUST point to base of fed src enlistment
  10. # BCBINDIR=<path> // optional, unless using BCHK=
  11. # TTBINDIR=<path> // optional, unless using TRUETIME=
  12. #
  13. # nmake args:
  14. #
  15. # Clean // will delete all files in destination dir
  16. # Full // will Clean, then build all derived files
  17. # debug= // builds a debug build (default)
  18. # retail= // builds a retail build
  19. # test= // retail but with the _DEBUG preprocessor symbol defined
  20. # // NOT valid in combination with BCHK=, TRUETIME=, or ICAP=
  21. # VER= // must have this argument, \\msr\federation\builds\$(VER) is created/needed
  22. # BCHK= // if you want to do a boundschecker build.
  23. # note: you must have BC already installed locally and define BCBINDIR to
  24. # point to the directory where nmcl.exe and nmlink.exe reside.
  25. # You can use the BCOPTS variable to add options to the BC compile.
  26. # TRUETIME= // if you want to instrument the build using Numega TrueTime
  27. # note: you must have TrueTime already installed locally and define TTBINDIR to
  28. # point to the directory where the TrueTime nmcl.exe and nmlink.exe reside.
  29. # You can use the TTOPTS variable to add options to the TT compile.
  30. # VERBOSE= // if you want verbose build mode. (default is non-verbose)
  31. #
  32. # All derived files (temp files, .res, output of midl, *.obj, *.exe/.dll...
  33. # are placed directly into the appropriate tree under $(FEDROOT)\Objs.
  34. #
  35. # The $(FEDROOT)\Objs tree is created on demand.
  36. # Since no derived files are placed in the source tree, multiple builds
  37. # can be run SIMULTANEOUSLY.
  38. #
  39. #############################################################################
  40. # Environment Variables
  41. #
  42. # keep the debug info in the exe for retail builds, so we can strip it out and leave the FPO info
  43. !IFDEF retail
  44. SPLITSYMBOLS=1
  45. !endif
  46. !IFDEF sretail
  47. SPLITSYMBOLS=1
  48. !endif
  49. SRCROOT=MSRGuard
  50. DESTROOT=MSRGuard
  51. MAINTARGROOT=MSRGuard
  52. MAINTARGEXT=exe
  53. INCLUDELOCAL=$(FEDEXT)\vc\atl\inc;$(FEDSRC)\Test\Inc;$(FEDSRC)\Inc;$(FEDSRC)\Zlib
  54. PCHROOT=pch
  55. PCHINC=
  56. PCHINCLOCAL=$(PCHROOT).h
  57. PROJCLEAN=ProjectClean
  58. CARGSLOCAL=/D"MSRGuard" /D _WIN32_WINNT=0x0400 $(STANDALONEDEFS)
  59. #############################################################################
  60. # Rules
  61. #
  62. !include "..\makefile.inc"
  63. #############################################################################
  64. # Build Targets
  65. #
  66. RARGS = /l 0x409 /d"MSRGuard" $(RARGSFLAVOR)
  67. OBJS= $(DESTDIR)\MSRGuard.obj \
  68. $(DESTDIR)\AppModeAttach.obj \
  69. $(DESTDIR)\AppModeBind.obj \
  70. $(DESTDIR)\AppModeCreate.obj \
  71. $(DESTDIR)\AppModeHelp.obj \
  72. $(DESTDIR)\LoadedModules.obj
  73. LIBS= $(LIBSFLAVOR) \
  74. kernel32.lib user32.lib gdi32.lib \
  75. advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib \
  76. version.lib netapi32.lib delayimp.lib comsupp.lib dbghelp.lib psapi.lib
  77. USERLIBS= \
  78. $(DESTDIR)\..\zlib\zlib.lib \
  79. $(DESTDIR)\..\test\tclib\tclib.lib \
  80. RESFILE= $(DESTDIR)\MSRGuard.res
  81. LARGS=/LIBPATH:$(DXROOT)\lib \
  82. /LIBPATH:$(FEDEXT)\Vc\lib \
  83. /OUT:$(MAINTARGFULLPATH) /SUBSYSTEM:WINDOWS \
  84. $(LARGSFLAVOR) /PDB:$(PDB) $(NOLOGO) \
  85. /MACHINE:I386 /ENTRY:mainCRTStartup \
  86. /DELAYLOAD:PSAPI.dll
  87. #############################################################################
  88. #
  89. # Dependencies
  90. #
  91. $(MAINTARGFULLPATH): $(DESTDIR) $(MSGFILE) $(OBJS) $(RESFILE) $(USERLIBS)
  92. $(LINK) $(LARGS) $(OBJS) $(RESFILE) $(LIBS) $(USERLIBS) $(DESTDIR)\$(PCHROOT).obj
  93. $(MAPSYM) -o $(DESTDIR)\$(MAINTARGROOT).sym $(DESTDIR)\$(MAINTARGROOT).map 2> NUL
  94. !ifdef browse
  95. $(BSCTARG) : $(DESTDIR)\*.sbr
  96. @echo Creating browse info file ($(MAINTARGROOT).bsc)...
  97. $(BSCMAKE) /nologo /Iu /o$(BSCTARG) $(DESTDIR)\*.sbr
  98. !endif
  99. $(PROJCLEAN):
  100. $(REMDIR) $(DESTDIR)
  101. $(DESTDIR)\MSRGuard.obj : $(PCHFILE)
  102. $(DESTDIR)\AppModeAttach.obj : $(PCHFILE)
  103. $(DESTDIR)\AppModeBind.obj : $(PCHFILE)
  104. $(DESTDIR)\AppModeCreate.obj : $(PCHFILE)
  105. $(DESTDIR)\AppModeHelp.obj : $(PCHFILE)
  106. $(DESTDIR)\LoadedModules.obj : $(PCHFILE)
  107. $(RESFILE): $(FEDSRC)\Inc\VerRes.rc $(SRCROOT).rc *.ini *.htm $(FEDSRC)\setup\Machine.ini
  108. @echo Compiling Resources...
  109. @copy $(SRCROOT).rc $(DESTDIR)
  110. @echo #define FLAVOR "$(FLAVOR)" >>$(DESTDIR)\$(SRCROOT).rc
  111. @type $(FEDSRC)\Inc\VerRes.rc >>$(DESTDIR)\$(SRCROOT).rc
  112. $(RC) $(RARGS) $(STANDALONEDEFS) /Fo$(DESTDIR)\$(SRCROOT).res $(DESTDIR)\$(SRCROOT).rc