From 4a358c77930acad68f2db3d7ec2348bb04030b53 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 7 Feb 2008 21:29:41 +0000 Subject: [PATCH] replace INCLUDE var in makefiles so that we can have a generic variables.msvc --- Box/Makefile | 16 +++++++++------- Common/Makefile | 16 +++++++++------- DataStr/Makefile | 10 ++++++---- Fltk/Makefile | 16 +++++++++------- Geo/Makefile | 16 +++++++++------- Graphics/Makefile | 16 +++++++++------- Mesh/Makefile | 26 ++++++++++++++------------ Numeric/Makefile | 10 ++++++---- Parallel/Makefile | 10 ++++++---- Parser/Makefile | 16 +++++++++------- Plugin/Makefile | 16 +++++++++------- Post/Makefile | 16 +++++++++------- contrib/ANN/Makefile | 10 ++++++---- contrib/MathEval/Makefile | 7 ++++--- contrib/Metis/Makefile | 21 +++++++++++++-------- contrib/NR/Makefile | 10 ++++++---- contrib/NativeFileChooser/Makefile | 12 +++++++----- contrib/Netgen/Makefile | 12 +++++++----- contrib/Tetgen/Makefile | 7 ++++--- variables.msvc | 20 +++++++++----------- 20 files changed, 160 insertions(+), 123 deletions(-) diff --git a/Box/Makefile b/Box/Makefile index edfaf8b4c4..938e049514 100644 --- a/Box/Makefile +++ b/Box/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.44 2008-01-23 07:45:27 geuzaine Exp $ +# $Id: Makefile,v 1.45 2008-02-07 21:29:38 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,12 +21,14 @@ include ../variables -LIB = ../lib/libGmshBox${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Parser\ - ${DASH}I../Fltk ${DASH}I../Plugin ${DASH}I../Parallel\ - ${DASH}I../contrib/ANN/include -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshBox${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ + ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Parser\ + ${DASH}I../Fltk ${DASH}I../Plugin ${DASH}I../Parallel\ + ${DASH}I../contrib/ANN/include + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = Box.cpp diff --git a/Common/Makefile b/Common/Makefile index 332a4a0e0a..916de5746b 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.155 2008-01-23 07:45:27 geuzaine Exp $ +# $Id: Makefile,v 1.156 2008-02-07 21:29:38 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,12 +21,14 @@ include ../variables -LIB = ../lib/libGmshCommon${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Parser\ - ${DASH}I../Plugin ${DASH}I../Fltk ${DASH}I../contrib/MathEval\ - ${DASH}I../contrib/ANN/include -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshCommon${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ + ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Parser\ + ${DASH}I../Plugin ${DASH}I../Fltk ${DASH}I../contrib/MathEval\ + ${DASH}I../contrib/ANN/include + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = Context.cpp\ Octree.cpp OctreeInternals.cpp\ diff --git a/DataStr/Makefile b/DataStr/Makefile index f66bec73d8..47572891c1 100644 --- a/DataStr/Makefile +++ b/DataStr/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.43 2008-01-23 07:45:27 geuzaine Exp $ +# $Id: Makefile,v 1.44 2008-02-07 21:29:38 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,9 +21,11 @@ include ../variables -LIB = ../lib/libGmshDataStr${LIBEXT} -INCLUDE = ${DASH}I../Common -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshDataStr${LIBEXT} + +INC = ${DASH}I../Common + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = List.cpp \ Malloc.cpp \ diff --git a/Fltk/Makefile b/Fltk/Makefile index 1e8eb72ee2..c27f73f30d 100644 --- a/Fltk/Makefile +++ b/Fltk/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.167 2008-01-23 07:45:28 geuzaine Exp $ +# $Id: Makefile,v 1.168 2008-02-07 21:29:39 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,12 +21,14 @@ include ../variables -LIB = ../lib/libGmshFltk${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Graphics\ - ${DASH}I../Geo ${DASH}I../Mesh ${DASH}I../Post ${DASH}I../Numeric\ - ${DASH}I../Parser ${DASH}I../Fltk ${DASH}I../Plugin ${DASH}I../utils/solvers\ - ${DASH}I../contrib/ANN/include ${DASH}I../contrib/NativeFileChooser -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshFltk${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Graphics\ + ${DASH}I../Geo ${DASH}I../Mesh ${DASH}I../Post ${DASH}I../Numeric\ + ${DASH}I../Parser ${DASH}I../Fltk ${DASH}I../Plugin ${DASH}I../utils/solvers\ + ${DASH}I../contrib/ANN/include ${DASH}I../contrib/NativeFileChooser + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = Main.cpp \ Message.cpp \ diff --git a/Geo/Makefile b/Geo/Makefile index e308d0a413..1707bedb3c 100644 --- a/Geo/Makefile +++ b/Geo/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.181 2008-02-05 18:58:04 geuzaine Exp $ +# $Id: Makefile,v 1.182 2008-02-07 21:29:39 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,12 +21,14 @@ include ../variables -LIB = ../lib/libGmshGeo${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Numeric ${DASH}I../Parser ${DASH}I../Fltk\ - ${DASH}I../contrib/NR ${DASH}I../contrib/ANN/include\ - ${DASH}I../contrib/MathEval -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshGeo${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ + ${DASH}I../Post ${DASH}I../Numeric ${DASH}I../Parser ${DASH}I../Fltk\ + ${DASH}I../contrib/NR ${DASH}I../contrib/ANN/include\ + ${DASH}I../contrib/MathEval + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = GEntity.cpp\ GVertex.cpp GEdge.cpp GEdgeLoop.cpp GFace.cpp GRegion.cpp\ diff --git a/Graphics/Makefile b/Graphics/Makefile index 67cf94aa99..6dcf448635 100644 --- a/Graphics/Makefile +++ b/Graphics/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.137 2008-01-23 07:45:28 geuzaine Exp $ +# $Id: Makefile,v 1.138 2008-02-07 21:29:39 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,12 +21,14 @@ include ../variables -LIB = ../lib/libGmshGraphics${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Fltk ${DASH}I../Numeric\ - ${DASH}I../Parser ${DASH}I../Plugin ${DASH}I../contrib/MathEval\ - ${DASH}I../contrib/ANN/include -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshGraphics${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ + ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Fltk ${DASH}I../Numeric\ + ${DASH}I../Parser ${DASH}I../Plugin ${DASH}I../contrib/MathEval\ + ${DASH}I../contrib/ANN/include + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = Draw.cpp \ Mesh.cpp \ diff --git a/Mesh/Makefile b/Mesh/Makefile index ba4f8c878f..6ca6db57ba 100644 --- a/Mesh/Makefile +++ b/Mesh/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.201 2008-02-05 18:58:04 geuzaine Exp $ +# $Id: Makefile,v 1.202 2008-02-07 21:29:39 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,16 +21,18 @@ include ../variables -LIB = ../lib/libGmshMesh${LIBEXT} -INCLUDE = ${DASH}I../Numeric ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo\ - ${DASH}I../Mesh ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Parser\ - ${DASH}I../Fltk ${DASH}I../contrib/NR ${DASH}I../contrib/Triangle\ - ${DASH}I../contrib/Tetgen ${DASH}I../contrib/Netgen\ - ${DASH}I../contrib/Netgen/libsrc/include\ - ${DASH}I../contrib/Netgen/libsrc/interface\ - ${DASH}I../contrib/ANN/include ${DASH}I../contrib/Metis\ - ${DASH}I../contrib/MathEval -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshMesh${LIBEXT} + +INC = ${DASH}I../Numeric ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo\ + ${DASH}I../Mesh ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Parser\ + ${DASH}I../Fltk ${DASH}I../contrib/NR ${DASH}I../contrib/Triangle\ + ${DASH}I../contrib/Tetgen ${DASH}I../contrib/Netgen\ + ${DASH}I../contrib/Netgen/libsrc/include\ + ${DASH}I../contrib/Netgen/libsrc/interface\ + ${DASH}I../contrib/ANN/include ${DASH}I../contrib/Metis\ + ${DASH}I../contrib/MathEval + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = Generator.cpp \ Field.cpp\ @@ -68,7 +70,7 @@ ${LIB}: ${OBJ} # Don't optimize BDS: it crashes with some flavors of gcc 4.1 (e.g. on debian etch) BDS.o: - ${CXX} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} ${DASH}c BDS.cpp + ${CXX} ${FLAGS} ${INC} ${SYSINCLUDE} ${DASH}c BDS.cpp clean: rm -f *.o *.obj diff --git a/Numeric/Makefile b/Numeric/Makefile index a962d9817b..ad42995a2f 100644 --- a/Numeric/Makefile +++ b/Numeric/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.45 2008-01-23 07:45:29 geuzaine Exp $ +# $Id: Makefile,v 1.46 2008-02-07 21:29:39 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,9 +21,11 @@ include ../variables -LIB = ../lib/libGmshNumeric${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Numeric ${DASH}I../contrib/NR -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshNumeric${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Numeric ${DASH}I../contrib/NR + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = Numeric.cpp\ NumericEmbedded.cpp\ diff --git a/Parallel/Makefile b/Parallel/Makefile index 6b7fc7d701..c5bb23254c 100644 --- a/Parallel/Makefile +++ b/Parallel/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.41 2008-01-23 07:45:29 geuzaine Exp $ +# $Id: Makefile,v 1.42 2008-02-07 21:29:39 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,9 +21,11 @@ include ../variables -LIB = ../lib/libGmshParallel${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../DataStr -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshParallel${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../DataStr + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = ParUtil.cpp diff --git a/Parser/Makefile b/Parser/Makefile index a5803fa209..68b06f4fc3 100644 --- a/Parser/Makefile +++ b/Parser/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.138 2008-01-23 07:45:29 geuzaine Exp $ +# $Id: Makefile,v 1.139 2008-02-07 21:29:39 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,11 +21,13 @@ include ../variables -LIB = ../lib/libGmshParser${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Fltk\ - ${DASH}I../Plugin ${DASH}I../Parallel ${DASH}I../contrib/ANN/include -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshParser${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ + ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Fltk\ + ${DASH}I../Plugin ${DASH}I../Parallel ${DASH}I../contrib/ANN/include + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = Gmsh.tab.cpp\ Gmsh.yy.cpp\ @@ -47,7 +49,7 @@ ${LIB}: ${OBJ} # Don't optimize Gmsh.tab.o: on many architectures, g++ -O2 generates # assembly code too large to be addressed correctly Gmsh.tab${OBJEXT}: - ${CXX} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} ${DASH}c Gmsh.tab.cpp + ${CXX} ${FLAGS} ${INC} ${SYSINCLUDE} ${DASH}c Gmsh.tab.cpp parser: bison -p gmsh_yy --output Gmsh.tab.cpp -d Gmsh.y diff --git a/Plugin/Makefile b/Plugin/Makefile index c265b5678d..dc03613693 100644 --- a/Plugin/Makefile +++ b/Plugin/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.148 2008-02-05 19:02:39 geuzaine Exp $ +# $Id: Makefile,v 1.149 2008-02-07 21:29:40 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,12 +21,14 @@ include ../variables -LIB = ../lib/libGmshPlugin${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../Graphics ${DASH}I../DataStr ${DASH}I../Geo\ - ${DASH}I../Mesh ${DASH}I../Post ${DASH}I../Fltk ${DASH}I../Numeric\ - ${DASH}I../contrib/ANN/include ${DASH}I../contrib/Triangle\ - ${DASH}I../contrib/MathEval -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshPlugin${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../Graphics ${DASH}I../DataStr ${DASH}I../Geo\ + ${DASH}I../Mesh ${DASH}I../Post ${DASH}I../Fltk ${DASH}I../Numeric\ + ${DASH}I../contrib/ANN/include ${DASH}I../contrib/Triangle\ + ${DASH}I../contrib/MathEval + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = Plugin.cpp PluginManager.cpp\ Levelset.cpp\ diff --git a/Post/Makefile b/Post/Makefile index 29ea8e13c7..a0f7071264 100644 --- a/Post/Makefile +++ b/Post/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.26 2008-01-23 07:45:30 geuzaine Exp $ +# $Id: Makefile,v 1.27 2008-02-07 21:29:40 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,12 +21,14 @@ include ../variables -LIB = ../lib/libGmshPost${LIBEXT} -INCLUDE = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Parser\ - ${DASH}I../Plugin ${DASH}I../Fltk ${DASH}I../contrib/MathEval\ - ${DASH}I../contrib/ANN/include -CFLAGS =${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../lib/libGmshPost${LIBEXT} + +INC = ${DASH}I../Common ${DASH}I../DataStr ${DASH}I../Geo ${DASH}I../Mesh\ + ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Parser\ + ${DASH}I../Plugin ${DASH}I../Fltk ${DASH}I../contrib/MathEval\ + ${DASH}I../contrib/ANN/include + +CFLAGS =${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = PView.cpp\ PViewData.cpp\ diff --git a/contrib/ANN/Makefile b/contrib/ANN/Makefile index 9a27886948..f9a4784b3a 100644 --- a/contrib/ANN/Makefile +++ b/contrib/ANN/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.19 2008-01-23 07:45:30 geuzaine Exp $ +# $Id: Makefile,v 1.20 2008-02-07 21:29:40 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,9 +21,11 @@ include ../../variables -LIB = ../../lib/libGmshANN${LIBEXT} -INCLUDE = ${DASH}I../../Common ${DASH}I./include -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +LIB = ../../lib/libGmshANN${LIBEXT} + +INC = ${DASH}I../../Common ${DASH}I./include + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = src/ANN.cpp\ src/bd_fix_rad_search.cpp\ diff --git a/contrib/MathEval/Makefile b/contrib/MathEval/Makefile index 19ab30467c..ba2c8b2bd1 100644 --- a/contrib/MathEval/Makefile +++ b/contrib/MathEval/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.18 2008-01-23 07:45:30 geuzaine Exp $ +# $Id: Makefile,v 1.19 2008-02-07 21:29:40 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -22,9 +22,10 @@ include ../../variables LIB = ../../lib/libGmshMathEval${LIBEXT} -INCLUDE = ${DASH}I../../Common ${DASH}I../../DataStr -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +INC = ${DASH}I../../Common ${DASH}I../../DataStr + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = matheval.cpp\ node.cpp\ diff --git a/contrib/Metis/Makefile b/contrib/Metis/Makefile index e095684447..25cd21e051 100644 --- a/contrib/Metis/Makefile +++ b/contrib/Metis/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.14 2008-01-23 07:45:30 geuzaine Exp $ +# $Id: Makefile,v 1.15 2008-02-07 21:29:40 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -22,8 +22,10 @@ include ../../variables LIB = ../../lib/libGmshMetis.a -INCLUDE = -I. -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} + +INC = ${DASH}I. + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} SRC = balance.c \ fm.c \ @@ -78,16 +80,19 @@ SRC = balance.c \ parmetis.c \ stat.c -OBJ = ${SRC:.c=.o} +OBJ = ${SRC:.c=${OBJEXT}} -.SUFFIXES: .o .c +.SUFFIXES: ${OBJEXT} .c ${LIB}: ${OBJ} - ${AR} ${LIB} ${OBJ} + ${AR} ${ARFLAGS}${LIB} ${OBJ} ${RANLIB} ${LIB} -.c.o: - ${CC} ${CFLAGS} -c $< -o ${<:.c=.o} +.c${OBJEXT}: + ${CC} ${CFLAGS} ${DASH}c $< ${DASH}o ${<:.c=${OBJEXT}} + if [ -r ${notdir ${<:.c=${OBJEXT}}} ]; then\ + mv -f ${notdir ${<:.c=${OBJEXT}}} ${<:.c=${OBJEXT}};\ + fi clean: rm -f *.o *.obj diff --git a/contrib/NR/Makefile b/contrib/NR/Makefile index 248d972600..44af1fca8d 100644 --- a/contrib/NR/Makefile +++ b/contrib/NR/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.9 2008-01-23 07:45:30 geuzaine Exp $ +# $Id: Makefile,v 1.10 2008-02-07 21:29:40 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,10 +21,12 @@ include ../../variables -LIB = ../../lib/libGmshNR${LIBEXT} -INCLUDE = ${DASH}I../../Common ${DASH}I../../DataStr ${DASH}I../../Numeric +LIB = ../../lib/libGmshNR${LIBEXT} + +INC = ${DASH}I../../Common ${DASH}I../../DataStr ${DASH}I../../Numeric + # don't optimize this library: there are some problems with gcc... -CFLAGS = ${FLAGS} ${INCLUDE} ${SYSINCLUDE} +CFLAGS = ${FLAGS} ${INC} ${SYSINCLUDE} SRC = brent.cpp\ dpythag.cpp\ diff --git a/contrib/NativeFileChooser/Makefile b/contrib/NativeFileChooser/Makefile index e3bf4997a7..91e4678300 100644 --- a/contrib/NativeFileChooser/Makefile +++ b/contrib/NativeFileChooser/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.4 2008-01-23 07:45:30 geuzaine Exp $ +# $Id: Makefile,v 1.5 2008-02-07 21:29:40 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,9 +21,11 @@ include ../../variables -LIB = ../../lib/libGmshNativeFileChooser${LIBEXT} -INCLUDE = ${DASH}I. -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE} ${DASH}DFLTK1 +LIB = ../../lib/libGmshNativeFileChooser${LIBEXT} + +INC = ${DASH}I. + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} ${DASH}DFLTK1 SRC = Fl_Native_File_Chooser.cxx OBJ = ${SRC:.cxx=${OBJEXT}} @@ -34,7 +36,7 @@ ${LIB}: ${OBJ} ${AR} ${ARFLAGS}${LIB} ${OBJ} ${RANLIB} ${LIB} -.cxx.o: +.cxx${OBJEXT}: ${CXX} ${CFLAGS} ${DASH}c $< clean: diff --git a/contrib/Netgen/Makefile b/contrib/Netgen/Makefile index a517f1aa80..87c4e768eb 100644 --- a/contrib/Netgen/Makefile +++ b/contrib/Netgen/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.28 2008-01-23 07:45:30 geuzaine Exp $ +# $Id: Makefile,v 1.29 2008-02-07 21:29:41 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,10 +21,12 @@ include ../../variables -LIB = ../../lib/libGmshNetgen${LIBEXT} -INCLUDE = ${DASH}I../../Common ${DASH}Ilibsrc/include ${DASH}Ilibsrc/interface -CFLAGS = ${OPTIM} ${FLAGS} ${INCLUDE} ${SYSINCLUDE}\ - ${DASH}DNO_PARALLEL_THREADS ${DASH}UWIN32 +LIB = ../../lib/libGmshNetgen${LIBEXT} + +INC = ${DASH}I../../Common ${DASH}Ilibsrc/include ${DASH}Ilibsrc/interface + +CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE}\ + ${DASH}DNO_PARALLEL_THREADS ${DASH}UWIN32 SRC = libsrc/opti/linopt.cpp \ libsrc/opti/bfgs.cpp \ diff --git a/contrib/Tetgen/Makefile b/contrib/Tetgen/Makefile index 2de7f1581e..f6af86e97f 100644 --- a/contrib/Tetgen/Makefile +++ b/contrib/Tetgen/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.9 2008-01-23 07:45:31 geuzaine Exp $ +# $Id: Makefile,v 1.10 2008-02-07 21:29:41 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -21,9 +21,10 @@ include ../../variables -LIB = ../../lib/libGmshTetgen${LIBEXT} +LIB = ../../lib/libGmshTetgen${LIBEXT} + # Do not optimize (same as Triangle...) -CFLAGS = ${FLAGS} ${DASH}DTETLIBRARY +CFLAGS = ${FLAGS} ${DASH}DTETLIBRARY SRC = predicates.cxx tetgen.cxx OBJ = ${SRC:.cxx=${OBJEXT}} diff --git a/variables.msvc b/variables.msvc index 31f87216a7..7e7cda4cb2 100644 --- a/variables.msvc +++ b/variables.msvc @@ -1,6 +1,8 @@ # This is a pre-filled variables file for building a blackbox version -# of Gmsh with Microsoft Visual C++ 2008. See doc/README.msvc for -# building instructions. +# of Gmsh with Microsoft Visual C++ (MSVC). +# +# This has been tested with MSVC 2003.NET and MSVC 2008. +# See doc/README.msvc for building instructions. # OS and host UNAME=WIN32MSVC @@ -9,11 +11,8 @@ HOSTNAME=localhost # The names of the C and C++ compilers CC=cl CXX=cl /EHsc /nologo /GR - -#MLd --> Single Thread debug ok? -#MTd--> Multit hread debug - - +# Add /MLd for single-thread debug mode +# /MTd for multi-thread debug mode # increase stack size to 16Mb to avoid stack overflows in recursive # tet classification for large 3D Delaunay grids @@ -22,10 +21,9 @@ LINKER=cl /F16777216 # All compiler flags except optimization flags FLAGS=/DWIN32 /D_USE_MATH_DEFINES /DHAVE_NO_DLL /DHAVE_NO_VSNPRINTF /DHAVE_NO_SNPRINTF /DHAVE_NO_SOCKLEN_T /DHAVE_ANN /DHAVE_MATH_EVAL /DHAVE_NETGEN /DHAVE_TETGEN -# Additional system includes -#SYSINCLUDE=/I"C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" - -SYSINCLUDE=/I"C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\INCLUDE" /I"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include" +# Additional system includes ($INCLUDE is automatically defined by MSVC when +# you launch the MSVC command prompt) +SYSINCLUDE=/I"${INCLUDE}" # Compiler optimization flags OPTIM=/O2 -- GitLab