1 #------------------------------------------------------------------------------
3 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 #------------------------------------------------------------------------------
9 # This file is part of OpenFOAM.
11 # OpenFOAM is free software: you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
16 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 # You should have received a copy of the GNU General Public License
22 # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 # Makefile used to compile wmake utilities.
30 #------------------------------------------------------------------------------
32 #------------------------------------------------------------------------------
33 # The Makefile use a POSIX shell
34 #------------------------------------------------------------------------------
38 #------------------------------------------------------------------------------
39 # Initialise suffices list
40 #------------------------------------------------------------------------------
46 #------------------------------------------------------------------------------
47 # set compilation and dependency building rules
48 #------------------------------------------------------------------------------
50 GENERAL_RULES
= $(WM_DIR
)/rules
/General
51 RULES
= $(WM_DIR
)/rules
/$(WM_ARCH
)$(WM_COMPILER
)
52 WMAKE_BIN
= $(WM_DIR
)/platforms
/$(WM_ARCH
)$(WM_COMPILER
)
54 include $(RULES
)/general
55 include $(RULES
)/$(WM_LINK_LANGUAGE
)
58 #------------------------------------------------------------------------------
60 #------------------------------------------------------------------------------
62 all: $(WMAKE_BIN
)/dirToString
$(WMAKE_BIN
)/wmkdep
$(WMAKE_BIN
)/wmkdepend
65 rm -f
$(WMAKE_BIN
)/* 2>/dev
/null
68 $(WMAKE_BIN
)/dirToString
: dirToString.c
69 @mkdir
-p
$(WMAKE_BIN
)
70 $(cc) $(cFLAGS
) dirToString.c
-o
$(WMAKE_BIN
)/dirToString
73 $(WMAKE_BIN
)/wmkdep
: wmkdep.l
74 @mkdir
-p
$(WMAKE_BIN
)
76 $(cc) $(cFLAGS
) lex.yy.c
-o
$(WMAKE_BIN
)/wmkdep
77 @
rm -f
lex.yy.c
2>/dev
/null
80 # for bootstrapping - use generated files directly (instead of from .atg file)
81 $(WMAKE_BIN
)/wmkdepend
: wmkdepend.
cpp \
82 wmkdependParser.
cpp wmkdependScanner.
cpp \
83 wmkdependParser.h wmkdependScanner.h
84 @mkdir
-p
$(WMAKE_BIN
)
86 wmkdepend.
cpp wmkdependParser.
cpp wmkdependScanner.
cpp \
87 -o
$(WMAKE_BIN
)/wmkdepend
89 #------------------------------------------------------------------------------