Déja;5843069 said:
In case you haven't done it yet, I've attached an updated makefile that is tailored for BTS (3.03) and which now uses the toolkit 2003 and platform sdk.
All of the dependencies should still be current.
Déja, thanks for posting your makefile. In trying to use it though, I get an immediate error on the first build request:
Building Precompiled Header
cl /O2 /G7 /D "NDEBUG" /D "FINAL_RELEASE" /MD /GR /Fp"Final/CvGameCoreDLL.pch" /Fo"Final/" /Fd"Final/vc70.pdb" /Zi /I "Boost-1.32.0\include" /I "Python24\include" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "CVGAMECOREDLL_EXPORTS" /D "_WINDLL" /D "_MBCS" /FD /EHsc /Yc"CvGameCoreDLL.h" /W3 /nologo /c /Gd /TP _precompile.cpp
_precompile.cpp
c1xx : fatal error C1083: Cannot open compiler intermediate file: 'Final/CvGameCoreDLL.pch': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
[edit] I know why this happened now -- I did not create a "Final" directory before starting the build. The makefile should really do this for you, but it's a simple thing to fix manually. My other questions below still stand. [/edit]
I have a few questions/observations after reviewing the makefile in more detail.
(1) I think that your definition for macro PCHOPTS needs to be part of the !IF DEFINED(DEBUGBUILD)/!ELSE/!ENDIF construction so that the "/Fp" compiler option that names the output .pch file is in the right directory (Final/ or Debug/ as appropriate).
(2) You define macro PCHOPTS and then don't use it to create the .pch file.
(3) Doesn't the definition of the PCH macro need to be the same as the "/Fp" directory and name that will be used (i.e., "Final/CvGameCoreDLL.pch" or "Debug/CvGameCoreDLL.pch" as appropriate, and not "$(OUTDIR)_precompile.obj"? Wouldn't that also mean that PCH should also be defined in the !IF/!ELSE/!ENDIF construct?
[edit] $(OUTDIR)_precompile.obj target is needed, must be linked with DLL or link fails. So, we need BOTH _precompile.obj AND CvGameCoreDLL.pch as targets, one for the link and the other for the compiles. [/edit]
(4) You define $(PCH) as a target, but you also have a definition earlier in the makefile for a target "$(OUTDIR)_precompile.obj". Is the first definition even necessary?
(5) Doesn't the !IF DEFINED(DEBUGBUILD)/!ELSE/!ENDIF construction need to be at the top of the makefile so the $(OUTDIR) references are properly resolved? Which would also mean moving the definitions of the CPPGLAGS and LINKFLAGS macros to the front as well, right?
My makefile skills are rusty, but I just don't see how your definitions can work as currently coded. If I'm missing something, please explain.
Thanks again for what I am sure can be a really good makefile for us to work with.
Regards,
smacfan