[gdal-dev] nmake.local on windows builds
Frédéric Trastour
webmaster at spaceyes.fr
Mon Feb 14 10:22:44 EST 2011
Frank,
IMHO, something that is missing in the actual build system is a way to allow
the user to specify additional libraries to link with without modifying
nmake.opt.
It is possible to specify some include folders with EXTRAFLAGS but no way to
initialize for example the ADD_LIBS variable.
This should be possible with a very minor change to nmake.opt :
Just replace the line :
# Any extra libraries needed on this platform?
ADD_LIBS =
With something like :
# Any extra libraries needed on this platform?
ADD_LIBS = $(ADD_LIBS)
With that, it is possible to specify additional libraries in nmake.opt or in
the EXT_NMAKE_OPT file.
For example :
#
# JPEG LS (lossless jpeg)
#
EXTRAFLAGS = $(EXTRAFLAGS) -DFRMT_jpegls
HAVE_CHARLS = yes
CHARLS_INC = -I$(3RDPARTY)/CharLS-1.0
CHARLS_LIB = $(3RDPARTY)/CharLS-1.0/$(BUILD_MODE)/CharLS.lib
ADD_LIBS = $(ADD_LIBS) $(CHARLS_LIB)
Best regards,
Frédéric.
> -----Message d'origine-----
> De : gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev-
> bounces at lists.osgeo.org] De la part de Frank Warmerdam
> Envoyé : vendredi 11 février 2011 23:27
> À : gdal-dev
> Objet : [gdal-dev] nmake.local on windows builds
>
> Folks,
>
> Some time ago Tamas added a mechanism to nmake.opt (the central include
> file for windows MSVC nmake based makefiles) so that you could provide
> an extra definition file on the commandline.
>
> eg.
> nmake -f makefile.vc EXT_NMAKE_OPT=mynmake.opt
>
> While this is useful, expecially in cases where it is desirable to
> have several build configurations out of one tree, I never used it. I
> always just adding "!INCLUDE nmake.osgeo4w" or "!INCLUDE nmake.frank"
> at the beginning of nmake.opt and put my definitions in that new file.
>
> With Kirk's recent introduction of a complicated nmake.opt file for the
> MrSID driver, I've learned that you can check for the existance of a
> file in an nmake !IF EXISTS directive, and I have incorporated use of this
> in nmake.opt to pull in "nmake.local" if it exists.
>
> So going forward, I'm hoping the default way of tailoring windows builds
> will be to create an nmake.local file overriding definitions from
> nmake.opt.
>
> Best regards,
> --
> ---------------------------------------+----------------------------------
> ----
> I set the clouds in motion - turn up | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list