makefile 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. #############################################################################
  2. #
  3. # Makefile for AutoUpdate.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. SRCROOT=AutoUpdate
  43. DESTROOT=AutoUpdate
  44. MAINTARGROOT=AutoUpdate
  45. SERVERDEST=$(FEDROOT)\Objs\$(FLAVOR)\AutoUpdate
  46. MAINTARGEXT=exe
  47. INCLUDELOCAL=$(FEDEXT)\vc\atl\inc;$(FEDSRC)\Test\Inc;$(FEDSRC)\Inc;$(FEDSRC)\AGC;$(FEDROOT)\Objs\$(FLAVOR)\Test\TCObj;$(FEDROOT)\Objs\$(FLAVOR)\AGC;$(SERVERDEST);$(FEDEXT)\sbn\include;$(FEDSRC)\Zlib;$(FEDSRC)\Clintlib
  48. PCHROOT=pch
  49. PCHINC=*.h ..\clintlib\AutoDownload.h
  50. PCHINCLOCAL=$(PCHROOT).h
  51. PROJCLEAN=ProjectClean
  52. CARGSLOCAL=/D"AutoUpdate" /D _WIN32_WINNT=0x0400 $(STANDALONEDEFS)
  53. #############################################################################
  54. # Rules
  55. #
  56. !include "..\makefile.inc"
  57. #############################################################################
  58. # Build Targets
  59. #
  60. RARGS = /l 0x409 /d"AutoUpdate" $(RARGSFLAVOR)
  61. OBJS= $(DESTDIR)\AutoUpdate.obj
  62. LIBS= $(LIBSFLAVOR) \
  63. kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib \
  64. advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib \
  65. version.lib netapi32.lib urlmon.lib delayimp.lib ws2_32.lib dplayx.lib \
  66. comctl32.lib wininet.lib lz32.lib
  67. # Unfortunately Autodownload.cpp is in clintlib, so we need to include a bunch of other
  68. # libs. One day I should move Autodownload.cpp out of clintlib and into another lib.
  69. # I was going to put Autodownload in zlib, but zlib doesn't uses _utility.
  70. USERLIBS= \
  71. $(DESTDIR)\..\zlib\zlib.lib \
  72. $(DESTDIR)\..\soundengine\soundengine.lib \
  73. $(DESTDIR)\..\_utility\Utility.lib \
  74. $(DESTDIR)\..\engine\Engine.lib \
  75. $(DESTDIR)\..\effect\Effect.lib \
  76. $(DESTDIR)\..\igc\igc.lib \
  77. $(DESTDIR)\..\clintlib\clintlib.lib \
  78. RESFILE= $(DESTDIR)\AutoUpdate.res
  79. LARGS=/LIBPATH:$(DXROOT)\lib \
  80. /LIBPATH:$(FEDEXT)\Vc\lib \
  81. /OUT:$(MAINTARGFULLPATH) /SUBSYSTEM:WINDOWS \
  82. $(LARGSFLAVOR) /PDB:$(PDB) $(NOLOGO) \
  83. /MACHINE:I386 /ENTRY:mainCRTStartup
  84. #############################################################################
  85. #
  86. # Dependencies
  87. #
  88. $(MAINTARGFULLPATH): $(DESTDIR) $(MSGFILE) $(OBJS) $(RESFILE) $(USERLIBS)
  89. $(LINK) $(LARGS) $(OBJS) $(RESFILE) $(LIBS) $(USERLIBS) $(DESTDIR)\$(PCHROOT).obj
  90. $(MAPSYM) -o $(DESTDIR)\$(MAINTARGROOT).sym $(DESTDIR)\$(MAINTARGROOT).map
  91. !ifdef browse
  92. $(BSCTARG) : $(DESTDIR)\*.sbr
  93. @echo Creating browse info file ($(MAINTARGROOT).bsc)...
  94. $(BSCMAKE) /nologo /Iu /o$(BSCTARG) $(DESTDIR)\*.sbr
  95. !endif
  96. $(PROJCLEAN):
  97. $(REMDIR) $(DESTDIR)
  98. $(DESTDIR)\AutoUpdate.obj : $(PCHFILE)
  99. $(RESFILE): $(FEDSRC)\Inc\VerRes.rc $(SRCROOT).rc
  100. @echo Compiling Resources...
  101. @copy $(SRCROOT).rc $(DESTDIR)
  102. @echo #define FLAVOR "$(FLAVOR)" >>$(DESTDIR)\AutoUpdate.rc
  103. @type $(FEDSRC)\Inc\VerRes.rc >>$(DESTDIR)\AutoUpdate.rc
  104. $(RC) $(RARGS) /Fo$(DESTDIR)\$(SRCROOT).res $(DESTDIR)\$(SRCROOT).rc