forked from OpenCMISS-Dependencies/cellml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (49 loc) · 2.12 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Makefile for compiling OpenCMISS(cellml)
#
# Original by David Nickerson.
# Changes:
#
#----------------------------------------------------------------------------------------------------------------------------------
include Makefile.common
#----------------------------------------------------------------------------------------------------------------------------------
include $(MAKEINC_ROOT)/Makefile_Compilers.inc
CMAKE_OPTIONS = #
CMAKE_OPTIONS += -DCMAKE_PREFIX_PATH="$(CELLML_INSTALL_DIR);$(COMMON_INSTALL_DIR)"
CMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=$(LIBOCCELLML_INSTALL_DIR)
ifeq ($(DEBUG),true)
CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=Debug
else
CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=Release
endif
CMAKE_ENV = #
CMAKE_ENV += FC=$(OCE_F90)
CMAKE_ENV += CC=$(OCE_CC)
CMAKE_ENV += CXX=$(OCE_CXX)
CMAKE_ENV += CFLAGS="$(OCE_CFLAGS)"
CMAKE_ENV += CXXFLAGS="$(OCE_CXXFLAGS)"
CMAKE_ENV += FFLAGS="$(OCE_F90FLAGS)"
CMAKE_ENV += LDFLAGS="$(OCE_LDFLAGS)"
#-----------------------------------------------------------------------------
# Perform build operations
#-----------------------------------------------------------------------------
main: preliminaries \
occellml_main_build
occellml_main_build:
rm -rf $(LIBOCCELLML_BUILD_DIR)
mkdir -p $(LIBOCCELLML_BUILD_DIR)
( cd $(LIBOCCELLML_BUILD_DIR) && $(CMAKE_ENV) cmake --debug-output $(CMAKE_OPTIONS) $(CURDIR) > build.log 2>&1 )
( cd $(LIBOCCELLML_BUILD_DIR) && make >> build.log 2>&1 )
( cd $(LIBOCCELLML_BUILD_DIR) && make install >> build.log 2>&1 )
#-----------------------------------------------------------------------------
# Make directories
#-----------------------------------------------------------------------------
preliminaries: $(LIBOCCELLML_BUILD_DIR)
$(LIBOCCELLML_BUILD_DIR):
mkdir -p $@
#-----------------------------------------------------------------------------
# Clean up
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Aliases
#-----------------------------------------------------------------------------
include $(MAKEINC_ROOT)/Makefile_Aliases.inc