1 ################################
2 # Targets to build Marble
4 ################################
8 ################################
11 MARBLE_NAME_SUFIX
:= -qt-
$(QT_VERSION
)
13 ################################
17 ################################
19 MARBLE_VERSION
:= 15.08.1
20 MARBLE_GIT_BRANCH
:= v
$(MARBLE_VERSION
)
22 MARBLE_BASE_NAME
:= marble-
$(MARBLE_VERSION
)
23 MARBLE_BUILD_CONF
:= Release
25 ifeq ($(UNAME
), Linux
)
26 ifeq ($(ARCH
), x86_64
)
27 MARBLE_NAME
:= $(MARBLE_BASE_NAME
)-linux-x64
29 MARBLE_NAME
:= $(MARBLE_BASE_NAME
)-linux-x86
31 MARBLE_DATA_BASE_DIR
:= share
/marble
/data
32 MARBLE_CMAKE_GENERATOR
:= "Unix Makefiles"
33 # for some reason Qt is not added to the path in make/tools.mk
34 MARBLE_BUILD_PATH
:= $(QT_SDK_PREFIX
)/bin
:$(PATH
)
35 else ifeq ($(UNAME
), Darwin
)
36 MARBLE_NAME
:= $(MARBLE_BASE_NAME
)-clang_64
37 MARBLE_DATA_BASE_DIR
:= share
/marble
/data
38 MARBLE_CMAKE_GENERATOR
:= "Unix Makefiles"
39 # for some reason Qt is not added to the path in make/tools.mk
40 MARBLE_BUILD_PATH
:= $(QT_SDK_PREFIX
)/bin
:$(PATH
)
41 else ifeq ($(UNAME
), Windows
)
42 MARBLE_NAME
:= $(MARBLE_BASE_NAME
)-$(QT_SDK_ARCH
)
43 MARBLE_DATA_BASE_DIR
:= data
44 MARBLE_CMAKE_GENERATOR
:= "MinGW Makefiles"
47 MARBLE_NAME
:= $(MARBLE_NAME_PREFIX
)$(MARBLE_NAME
)$(MARBLE_NAME_SUFIX
)
48 MARBLE_SRC_DIR
:= $(ROOT_DIR
)/3rdparty
/marble
49 MARBLE_BUILD_DIR
:= $(BUILD_DIR
)/3rdparty
/$(MARBLE_NAME
)
50 MARBLE_INSTALL_DIR
:= $(BUILD_DIR
)/3rdparty
/install/$(MARBLE_NAME
)
51 MARBLE_DATA_DIR
:= $(MARBLE_INSTALL_DIR
)/$(MARBLE_DATA_BASE_DIR
)
52 MARBLE_PATCH_FILE
:= $(ROOT_DIR
)/make
/3rdparty
/marble
/marble-
$(MARBLE_VERSION
).patch
54 GOOGLE_SAT_PATCH_FILE
:= $(ROOT_DIR
)/make
/3rdparty
/marble
/googlesat.patch
58 @
$(ECHO
) "Building marble $(call toprel, $(MARBLE_SRC_DIR)) into $(call toprel, $(MARBLE_BUILD_DIR))"
59 $(V1
) $(MKDIR
) -p
$(MARBLE_BUILD_DIR
)
60 $(V1
) ( $(CD
) $(MARBLE_BUILD_DIR
) && \
61 if
[ -n
"$(MARBLE_BUILD_PATH)" ]; then \
62 PATH
=$(MARBLE_BUILD_PATH
) ; \
64 $(CMAKE
) -Wno-dev
-G
$(MARBLE_CMAKE_GENERATOR
) -DCMAKE_BUILD_TYPE
=$(MARBLE_BUILD_CONF
) \
65 -DCMAKE_MAKE_PROGRAM
=$(MAKE
) \
66 -DWITH_KF5
=FALSE
-DQT5BUILD
=ON
-DBUILD_WITH_DBUS
=OFF
-DMARBLE_NO_WEBKIT
=TRUE
-DWITH_DESIGNER_PLUGIN
=NO \
67 -DCMAKE_INSTALL_PREFIX
=$(MARBLE_INSTALL_DIR
) $(MARBLE_SRC_DIR
) && \
71 @
$(ECHO
) "Copying restricted maps to $(call toprel, $(MARBLE_DATA_DIR))"
72 @
$(ECHO
) "Copying Google Maps"
73 $(V1
) $(MKDIR
) -p
$(MARBLE_DATA_DIR
)/maps
/earth
/googlemaps
74 $(V1
) $(CP
) $(MARBLE_SRC_DIR
)/googlemaps
/googlemaps.dgml
$(MARBLE_DATA_DIR
)/maps
/earth
/googlemaps
/
75 $(V1
) $(CP
) $(MARBLE_SRC_DIR
)/googlemaps
/preview.png
$(MARBLE_DATA_DIR
)/maps
/earth
/googlemaps
/
76 $(V1
) $(CP
) -R
$(MARBLE_SRC_DIR
)/googlemaps
/0 $(MARBLE_DATA_DIR
)/maps
/earth
/googlemaps
/
77 @
$(ECHO
) "Copying Google Sat"
78 $(V1
) $(MKDIR
) -p
$(MARBLE_DATA_DIR
)/maps
/earth
/googlesat
79 $(V1
) $(CP
) $(MARBLE_SRC_DIR
)/googlesat
/googlesat.dgml
$(MARBLE_DATA_DIR
)/maps
/earth
/googlesat
/
80 $(V1
) $(CP
) $(MARBLE_SRC_DIR
)/googlesat
/preview.png
$(MARBLE_DATA_DIR
)/maps
/earth
/googlesat
/
81 $(V1
) $(CP
) -R
$(MARBLE_SRC_DIR
)/googlesat
/0 $(MARBLE_DATA_DIR
)/maps
/earth
/googlesat
/
82 $(V1
) $(CP
) -R
$(MARBLE_SRC_DIR
)/googlesat
/streets
$(MARBLE_DATA_DIR
)/maps
/earth
/googlesat
/
84 .PHONY
: package_marble
86 @
$(ECHO
) "Packaging $(call toprel, $(MARBLE_INSTALL_DIR)) into $(notdir $(MARBLE_INSTALL_DIR)).tar"
87 #$(V1) $(CP) $(ROOT_DIR)/make/3rdparty/marble/LibrePilotReadme.txt $(MARBLE_INSTALL_DIR)/
89 $(CD
) $(MARBLE_INSTALL_DIR
)/..
&& \
90 $(TAR
) cf
$(notdir $(MARBLE_INSTALL_DIR
)).
tar $(notdir $(MARBLE_INSTALL_DIR
)) && \
91 $(ZIP
) -f
$(notdir $(MARBLE_INSTALL_DIR
)).
tar && \
92 $(call MD5_GEN_TEMPLATE
,$(notdir $(MARBLE_INSTALL_DIR
)).
tar.gz
) ; \
96 .PHONY
: prepare_marble
97 prepare_marble
: clone_marble
101 $(V1
) if
[ ! -d
"$(MARBLE_SRC_DIR)" ]; then \
102 $(ECHO
) "Cloning marble..." ; \
103 $(GIT
) clone
--no-checkout git
://anongit.kde.org
/marble
$(MARBLE_SRC_DIR
) ; \
105 @
$(ECHO
) "Fetching marble..."
106 $(V1
) ( $(CD
) $(MARBLE_SRC_DIR
) && $(GIT
) fetch
; )
107 @
$(ECHO
) "Checking out marble $(MARBLE_GIT_BRANCH)"
108 $(V1
) ( $(CD
) $(MARBLE_SRC_DIR
) && $(GIT
) fetch
--tags ; )
109 $(V1
) ( $(CD
) $(MARBLE_SRC_DIR
) && $(GIT
) checkout
--quiet
--force $(MARBLE_GIT_BRANCH
) ; )
110 $(V1
) if
[ -e
$(MARBLE_PATCH_FILE
) ]; then \
111 $(ECHO
) "Patching marble..." ; \
112 ( $(CD
) $(MARBLE_SRC_DIR
) && $(GIT
) apply
$(MARBLE_PATCH_FILE
) ; ) \
115 $(V1
) if
[ ! -d
"$(MARBLE_SRC_DIR)/googlemaps" ]; then \
116 $(ECHO
) "Cloning googlemaps to $(call toprel, $(MARBLE_SRC_DIR)/googlemaps)" ; \
117 $(GIT
) clone https
://gitlab.com
/marble-restricted-maps
/googlemaps.git
$(MARBLE_SRC_DIR
)/googlemaps
; \
119 @
$(ECHO
) "Fetching googlemaps..."
120 $(V1
) ( $(CD
) $(MARBLE_SRC_DIR
)/googlemaps
&& $(GIT
) fetch
; )
121 @
$(ECHO
) "Checking out googlemaps"
122 $(V1
) ( $(CD
) $(MARBLE_SRC_DIR
)/googlemaps
&& $(GIT
) checkout
--quiet
--force master
; )
124 $(V1
) if
[ ! -d
"$(MARBLE_SRC_DIR)/googlesat" ]; then \
125 $(ECHO
) "Cloning googlesat to $(call toprel, $(MARBLE_SRC_DIR)/googlesat)" ; \
126 $(GIT
) clone https
://gitlab.com
/marble-restricted-maps
/googlesat.git
$(MARBLE_SRC_DIR
)/googlesat
; \
128 @
$(ECHO
) "Fetching googlesat..."
129 $(V1
) ( $(CD
) $(MARBLE_SRC_DIR
)/googlesat
&& $(GIT
) fetch
; )
130 @
$(ECHO
) "Checking out googlesat"
131 $(V1
) ( $(CD
) $(MARBLE_SRC_DIR
)/googlesat
&& $(GIT
) checkout
--quiet
--force master
; )
132 $(V1
) if
[ -e
$(GOOGLE_SAT_PATCH_FILE
) ]; then \
133 $(ECHO
) "Patching google sat..." ; \
134 ( $(CD
) $(MARBLE_SRC_DIR
)/googlesat
&& $(GIT
) apply
$(GOOGLE_SAT_PATCH_FILE
) ; ) \
139 @
$(ECHO
) $(MSG_CLEANING
) $(call toprel
, $(MARBLE_BUILD_DIR
))
140 $(V1
) [ ! -d
"$(MARBLE_BUILD_DIR)" ] ||
$(RM
) -r
"$(MARBLE_BUILD_DIR)"
141 @
$(ECHO
) $(MSG_CLEANING
) $(call toprel
, $(MARBLE_INSTALL_DIR
))
142 $(V1
) [ ! -d
"$(MARBLE_INSTALL_DIR)" ] ||
$(RM
) -r
"$(MARBLE_INSTALL_DIR)"
144 .PHONY
: clean_all_marble
145 clean_all_marble
: clean_marble
146 @
$(ECHO
) $(MSG_CLEANING
) $(call toprel
, $(MARBLE_SRC_DIR
))
147 $(V1
) [ ! -d
"$(MARBLE_SRC_DIR)" ] ||
$(RM
) -r
"$(MARBLE_SRC_DIR)"
151 all_marble
: prepare_marble marble package_marble