EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Detect VC++ version in Makefile?
From: Torsten Bögershausen <[email protected]>
To: Mark Rivers <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Date: Sun, 29 Jul 2018 18:23:25 +0100
Can you get the version by calling an external program ?
In this case you can do that from the Makefile, creating a macro like this:

uname_S   := $(shell sh -c 'uname -s 2>/dev/null || echo unknown')
uname_M   := $(shell sh -c 'uname -m 2>/dev/null || echo unknown')
uname_R   := $(shell sh -c 'uname -r 2>/dev/null | sed -e "s/[()/]/-/g"|| echo unknown’)

# and later
ifneq (,$(findstring CYGWIN,$(uname_S)))
  ifneq (,$(findstring x86_64,$(uname_M)))
    CFLAGS        += -DSTART_WINSOCK2
    WINOBJS       += $(BIN)/startWinSock.o
  endif
  CC             = gcc
  CFLAGS         += -Wall -Werror
  #CFLAGS         += -DUSE_WINSOCK2
  EXE            = .exe
  LINKWINSOCK    = -lws2_32
endif

I hope this give inspiration, there may be a better way.


> On 29 juli 2018, at 15:00, Mark Rivers <[email protected]> wrote:
> 
> Folks,
> 
> I have a vendor Windows SDK where the required name of the library depends on the version of VC++.
>  
> I am currently requiring manual edits of the EPICS Makefile to change the name of the LIB file depending on VS version.
>  
> # Add locally compiled object code
> PROD_LIBS += pointGrey
> # Use this line for Visual Studio 2010
> #PROD_LIBS_WIN32 += FlyCapture2_v100
> # Use this line for Visual Studio 2013
> #PROD_LIBS_WIN32 += FlyCapture2_v120
> # Use this line for Visual Studio 2015
> PROD_LIBS_WIN32 += FlyCapture2_v140
>  
> Does anyone have a mechanism to detect this automatically in the Makefile so this manual editing is not needed?
>  
> Thanks,
> Mark


References:
Detect VC++ version in Makefile? Mark Rivers

Navigate by Date:
Prev: Detect VC++ version in Makefile? Mark Rivers
Next: Re: Detect VC++ version in Makefile? Johnson, Andrew N.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Detect VC++ version in Makefile? Mark Rivers
Next: Re: Detect VC++ version in Makefile? Johnson, Andrew N.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 29 Jul 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·