<html>
<body>
Frank,<br><br>
I would think that adding some flag when building which tells whether
it's a release or debug version would be very handy. I made some changes
to makefile.vc and nmake.opt see the below (changes made based on the
head version from CVS).<br><br>
<b>makefile.vc<br><br>
#MY CHANGES<br><br>
</b>!IFDEF BUILD_DEBUG<br>
OPTFLAGS =<x-tab> </x-tab>/nologo /Od
/MTd /Zi /Fdmapserv.pdb $(WARNING_LEVEL) $(DEBUG)<br>
BASE_CFLAGS = <x-tab> </x-tab>$(OPTFLAGS) -DWIN32
-D_WIN32<br>
LDFLAGS
=<x-tab> </x-tab>$(LDEBUG)
/NODEFAULTLIB:libcmtd /pdb:"mapserv.pdb"<br>
!ELSE<br>
OPTFLAGS =<x-tab> </x-tab>/nologo /MT
$(WARNING_LEVEL) $(DEBUG)<br>
BASE_CFLAGS = <x-tab> </x-tab>$(OPTFLAGS) -DWIN32
-D_WIN32<br>
LDFLAGS
=<x-tab> </x-tab>$(LDEBUG)<br>
!ENDIF<br><br>
$(MS_LIB):<x-tab> </x-tab>$(MS_OBJS)<br>
<x-tab> </x-tab>if exist
$(GDAL_DIR)\gdal.pdb copy $(GDAL_DIR)\gdal.pdb .<br>
<x-tab> </x-tab>lib
/out:$(MS_LIB) $(MS_OBJS)<br>
link /dll $(LDEBUG) \<br>
<x-tab> </x-tab><x-tab> </x-tab>$(MS_OBJS)
$(EXTERNAL_LIBS) /def:mapserver.def \<br>
<x-tab> </x-tab><x-tab> </x-tab>
/out:$(MS_DLL) /implib:$(MS_LIB_DLL)<br><br>
<b>#ORIGINAL<br><br>
</b>OPTFLAGS =<x-tab> </x-tab>/nologo /Zi $(WARNING_LEVEL) $(DEBUG)<br>
BASE_CFLAGS = <x-tab> </x-tab>$(OPTFLAGS) -DWIN32 -D_WIN32<br>
LDFLAGS =<x-tab> </x-tab>/NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd /DEBUG<br><br>
$(MS_LIB):<x-tab> </x-tab>$(MS_OBJS)<br>
<x-tab> </x-tab>if exist $(GDAL_DIR)\gdal.pdb copy $(GDAL_DIR)\gdal.pdb .<br>
<x-tab> </x-tab>lib /out:$(MS_LIB) $(MS_OBJS)<br>
link /dll /debug \<br>
<x-tab> </x-tab><x-tab> </x-tab>$(MS_OBJS) $(EXTERNAL_LIBS) /def:mapserver.def \<br>
<x-tab> </x-tab><x-tab> </x-tab> /out:$(MS_DLL) /implib:$(MS_LIB_DLL)<br><br>
<br>
and in<br><br>
<b>nmake.opt<br><br>
#MY CHANGES<br><br>
</b>########################################################################<br>
# Section III: Debug flags<br>
########################################################################<br>
# Should not need to be updated.<br>
########################################################################<br>
!IFDEF BUILD_DEBUG<br>
# DEBUG Build flags<br>
# Set the DEBUG flag if you wish to make a debug build<br>
DEBUG=/DDEBUG<br>
# Set the Warning level for the compiler (defaults to W1)<br>
WARNING_LEVEL=/W3<br>
# Set the linker debug option<br>
LDEBUG=/debug<br>
!ELSE<br>
# DEBUG Build flags<br>
# Set the DEBUG flag if you wish to make a debug build<br>
DEBUG=<br>
# Set the Warning level for the compiler (defaults to W1)<br>
WARNING_LEVEL=/W3<br>
# Set the linker debug option<br>
LDEBUG=<br>
!ENDIF<br><br>
<br>
<b>#ORIGINAL<br><br>
</b>########################################################################<br>
# Section III: Debug flags<br>
########################################################################<br>
# Should not need to be updated.<br>
########################################################################<br><br>
# DEBUG Build flags<br>
# Set the DEBUG flag if you wish to make a debug build<br>
DEBUG=/DDEBUG<br>
# Set the Warning level for the compiler (defaults to W1)<br>
WARNING_LEVEL=/W3<br>
# Set the linker debug option<br>
LDEBUG=/debug<br><br>
<br>
But for the above changes to be usefull I had to change other makefiles and nmake.opt (if you are interested I can send you the files I had to change):<br><br>
- freetype<br>
- gd<br>
- gdal<br>
- jpeg<br>
- libpng<br>
- proj<br><br>
I would actually advise to use /MT (static linkage of the runtime libraries). My experience with the runtime libraries (MSVCT**.DLL) are not very nice. And offcourse this also could be made configurable trough commandline flags for the NMAKE command.<br><br>
Cheers,<br><br>
Valik<br><br>
At 18:17 23/11/2004, Frank Warmerdam wrote:<br>
<blockquote type=cite class=cite cite="">Assefa,<br><br>
I am intrested in reworking the default configuration of the mapserver<br>
win32 builds somewhat with the following in mind:<br><br>
o Default to assuming folks are building against the bgd GD DLLs with all the<br>
stuff they include.<br>
o Disable (comment out) all the optional packages (ming, pdf, gdal, curl, etc)<br>
by default.<br>
o Move OPTFLAGS and LDFLAGS from makefile.vc to nmake.opt since they<br>
frequently need to be changed.<br>
o Use /MD by default, since many support libraries like GDAL and PROJ.4 are<br>
built that way by default. Statically linking proj.lib in (that was built<br>
with /MD) with a non-/MD mapserver is bad karma.<br><br>
In general, I would like to make building a simple MapServer build alot easier,<br>
and then let people add stuff to that rather than starting with lots of stuff<br>
broken.<br><br>
Also, using the pre-built GD makes *alot* of stuff easier.<br><br>
What do you think? Mind if I "do a number" on makefile.vc and nmake.opt?<br><br>
Best regards,<br>
--<br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com<br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" eudora="autourl">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial Programmer for Rent<br>
</blockquote>
<x-sigsep><p></x-sigsep>
Drs. Valik Solórzano Barboza<br>
Geodan SDT b.v.<br>
President Kennedylaan 1<br>
1079 MB Amsterdam (NL)<br>
-------------------------------------<br>
Tel: +31 (0)20 - 5711 311<br>
Fax: +31 (0)20 - 5711 333<br>
-------------------------------------<br>
E-mail: valik.solorzano.barboza@geodan.nl<br>
Website: <a href="http://www.geodan.nl/" eudora="autourl">www.geodan.nl<br>
</a>Disclaimer: <a href="http://www.geodan.nl/disclaimer" eudora="autourl">www.geodan.nl/disclaimer<br>
</a>------------------------------------- </body>
</html>