After much thought and deliberation... a change in EPANET repo
policy regarding Makefiles and their output targets. Used to create library and executable file names that included the compiler (e.g., *_gcc_*) and the SVN rev (*_309_*). This was to allow development along the trunk while keeping clean track of the SVN versions that objects were made from. Maybe a good idea in part, but no longer. It collapsed under its own complexity. The need to keep track of all the specific file names became more burdensome that the need to keep track of which source actually built an object. As of now, Makefiles produce unadorned file names: Linux: lib<name>.so <name> Cygwin: cyg<name>.dll cyg<name>.exe libcyg<name>.dll.a MSVC: <name>.dll <name>.exe <name>.lib MinGW: Same as MSVC Darwin: Don't know about this, but I think they already were produced with just dy extensions Under this scheme MinGW looks just like MSVC, but I guess that's the whole point... git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@314 c320cabd-cc23-0410-96d8-e60fbf53ed7f
This commit is contained in:
@@ -1,43 +1,48 @@
|
||||
# Cygwin/MinGW Makefile for EPANET
|
||||
# MinGW Makefile for EPANET
|
||||
|
||||
# Note: This makefile usese MinGW to produce native windows
|
||||
# libraries and executables. The dll/import library, and
|
||||
# executable files will have the same names as those produced
|
||||
# using other Windows compilers, e.g. MSVC++. So be aware that
|
||||
# there is no way to reliably distinguish between these two compiler
|
||||
# sources based on output filenames.
|
||||
|
||||
# This will build EPANET as a native windows DLL and import
|
||||
# library (epanet_gcc_<Rev>.dll/libepanet_gcc_<Rev>.dll.a) under Cygwin/MinGW,
|
||||
# and a standalone executable (epanet_gcc_<Rev>.exe).
|
||||
# <Rev> is the atomic revision number of the EPANET SVN repo,
|
||||
# so the results of each build can be unambiguously tracked to a repo Rev.
|
||||
# library (epanet2.dll/libepanet2.dll.a) using MinGW/gcc,
|
||||
# and a standalone executable (epanet2.exe).
|
||||
# This makefile also creates a windows batch file
|
||||
# (see MScmdname below) that will produce an import
|
||||
# (see MScmdname below) that can be run to produce an import
|
||||
# library for linking the DLL using MSVC.
|
||||
# This makefile assumes a Cygwin environment with minimal
|
||||
# This makefile assumes a minimum
|
||||
# MinGW installation, and uses the MinGW gcc compiler from
|
||||
# the MinGW install directory.
|
||||
# The current release of MinGW can be obtained from
|
||||
# http://sourceforge.net/project/showfiles.php?group_id=2435
|
||||
# The current release of the Cygwin environment can be
|
||||
# obtained from http://www.cygwin.com
|
||||
# http://www.mingw.org/wiki/Getting_Started -- the easiest
|
||||
# approach is to download the latest MingW installer and
|
||||
# accept all of the defaults.
|
||||
|
||||
# The following targets are defined (for execution in
|
||||
# the build directory under the Cygwin environment):
|
||||
# the build directory):
|
||||
# make
|
||||
# -Builds epanet_gcc_<Rev>.dll, epanet_gcc_<Rev>.def, libepanet_gcc_<Rev>.dll.a,
|
||||
# epanet_gcc_<Rev>.exe
|
||||
# -Builds epanet2.dll, epanet2.def, libepanet2.dll.a,
|
||||
# epanet2.exe
|
||||
# make install
|
||||
# -Creates shell wrappers runepanet_<Rev>.sh and CreateMSLib_<Rev>.bat that
|
||||
# execute epanet_gcc_<Rev>.exe, and MSVC 'lib' (to create an MSVC
|
||||
# import library). The runepanet_<Rev>.sh wrapper simply exports
|
||||
# -Creates scripts runepanet2.sh and CreateEpanet2Lib.bat that
|
||||
# execute epanet2.exe, and MSVC 'lib' (to create an MSVC
|
||||
# import library). The runepanet2.sh wrapper simply exports
|
||||
# environment variables so that the DLL is found at runtime,
|
||||
# allowing you to specify your own locations for installing
|
||||
# the DLL.
|
||||
# -Installs epanet_gcc_<Rev>.dll, epanet_gcc_<Rev>.exe, and runepanet_<Rev>.sh
|
||||
# -Installs epanet2.dll, epanet2.exe, and runepanet2.sh
|
||||
# in <prefix>/bin, where <prefix> defaults to ~ (and can be set
|
||||
# below to something different - see "Install directories")
|
||||
# -Installs libepanet_gcc_<Rev>.dll.a (import library), epanet_gcc_<Rev>.def,
|
||||
# and CreateMSLib-<Rev>.bat in <prefix>/lib
|
||||
# -Installs libepanet2.dll.a (import library), epanet2.def,
|
||||
# and CreateEpanet2Lib.bat in <prefix>/lib
|
||||
# -Installs epanet2.h in <prefix>/include. This is the required
|
||||
# header file for the EPANET programmer's toolkit, and thus
|
||||
# <prefix>/include should be on your CPP include search path
|
||||
# for subsequent use of the toolkit and linking with the import
|
||||
# library libepanet_gcc_<Rev>.dll.a.
|
||||
# library libepanet2.dll.a or epanet2.lib.
|
||||
# make clean
|
||||
# -Removes object and library files, returning the build directory
|
||||
# to its pristine state.
|
||||
@@ -53,23 +58,22 @@ SHELL = /bin/sh
|
||||
# MinGW top level install directory, accessible from build environment
|
||||
MinGWdir = /cygdrive/c/MinGW
|
||||
# Microsoft lib tool directory (for creating an MS import library)
|
||||
MSVClibexe = c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\bin\\lib
|
||||
MSVClibexe = c:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\\lib
|
||||
|
||||
# Target filenames
|
||||
# svnname.sh constructs a name: <prefix><root><Rev><postfix>
|
||||
# where <Rev> is the atomic revision number of the svn repo.
|
||||
epanetsvnpath = ../../..
|
||||
epanetrootname := $(shell ../svnname.sh $(epanetsvnpath) "" epanet_gcc_ "")
|
||||
epanetrootname := epanet2
|
||||
dllname := $(epanetrootname).dll
|
||||
defname := $(epanetrootname).def
|
||||
implibname = lib$(dllname).a
|
||||
exename := $(epanetrootname)
|
||||
# Shell wrapper
|
||||
runcmdtemplate = runepanet.sh.template
|
||||
runcmdname = $(shell ../svnname.sh $(epanetsvnpath) "" runepanet_ .sh)
|
||||
runcmdname = runepanet2.sh
|
||||
# MSVC import lib batch file
|
||||
MScmdtemplate = CreateMSLib.bat.template
|
||||
MScmdname = $(shell ../svnname.sh $(epanetsvnpath) "" CreateMSLib_ .bat)
|
||||
MScmdname = CreateEpanet2Lib.bat
|
||||
# Location of EPANET toolkit includes
|
||||
epanetincludedir = ../../include
|
||||
# Search path for sources
|
||||
|
||||
Reference in New Issue
Block a user