-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Makefile.linux
161 lines (122 loc) · 7.09 KB
/
Makefile.linux
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
WEBOTS_HOME ?= ..
WEBOTS_DEPENDENCY_PATH ?= $(WEBOTS_HOME)/dependencies
WEBOTS_HOME_LIB = $(WEBOTS_HOME)/lib/webots
include $(WEBOTS_HOME)/resources/Makefile.os.include
DEPENDENCIES_URL = https://cyberbotics.com/files/repository/dependencies/linux64/release
QT_VERSION = 6.4.3
QT_PACKAGE = webots-qt-$(QT_VERSION)-linux64-release.tar.bz2
OPENAL_PACKAGE = openal-linux64-1.16.0.tar.bz2
OIS_PACKAGE = libOIS.1.4.tar.bz2
ASSIMP_PACKAGE = libassimp-5.2.3.tar.bz2
PICO_PACKAGE = libpico.tar.bz2
LUA_PACKAGE = lua-5.2.3.tar.gz
OPENSSL_PACKAGE = libssl_1.1.tar.xz
PACKAGES = qt open-al ois pico lua assimp
PACKAGES_CLEAN = $(addsuffix -clean, $(PACKAGES))
ifeq ($(UBUNTU_VERSION), 22.04)
PACKAGES += open-ssl
endif
.PHONY: release debug distrib profile clean cleanse $(PACKAGES) $(PACKAGES_CLEAN)
release debug distrib profile: ../.clang-format $(PACKAGES)
clean:
cleanse: $(PACKAGES_CLEAN)
@rm -f ../.clang-format
../.clang-format:
@echo "# copying clang-format configuration file"
ifeq ($(UBUNTU_VERSION), 22.04)
@cp .clang-format-9 $@
else ifeq ($(UBUNTU_VERSION), 20.04)
@cp .clang-format-9 $@
else
@cp .clang-format-6 $@
endif
qt-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/webots-qt-*-linux64-release.tar.bz2 $(WEBOTS_HOME)/$(QT_PACKAGE)* $(WEBOTS_HOME_LIB)/libQt* $(WEBOTS_HOME_LIB)/libicu* $(WEBOTS_HOME_LIB)/qt $(WEBOTS_HOME)/include/qt $(WEBOTS_HOME)/bin/qt/lrelease $(WEBOTS_HOME)/bin/qt/lupdate $(WEBOTS_HOME)/bin/qt/moc
qt: $(WEBOTS_HOME_LIB)/libQt6Core.so.$(QT_VERSION)
$(WEBOTS_HOME_LIB)/libQt6Core.so.$(QT_VERSION): $(WEBOTS_DEPENDENCY_PATH)/$(QT_PACKAGE)
@echo "# uncompressing $(QT_PACKAGE)"
@tar xfm $(WEBOTS_DEPENDENCY_PATH)/$(QT_PACKAGE) -C $(WEBOTS_HOME)
$(WEBOTS_DEPENDENCY_PATH)/$(QT_PACKAGE):
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(QT_PACKAGE)
@echo "# downloading $(QT_PACKAGE)"
@wget -qq $(DEPENDENCIES_URL)/$(QT_PACKAGE) -P $(WEBOTS_DEPENDENCY_PATH)
@if [ "$$(md5sum $(QT_PACKAGE) | awk '{print $$1;}')" != "a5448e2005fa981278f5348b43809932" ]; then echo "MD5 checksum failed for $(QT_PACKAGE)"; exit 1; fi
@touch $(WEBOTS_DEPENDENCY_PATH)/$(QT_PACKAGE)
open-al-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/openal $(WEBOTS_DEPENDENCY_PATH)/$(OPENAL_PACKAGE)* $(WEBOTS_HOME_LIB)/libopenal.so*
open-al: $(WEBOTS_HOME_LIB)/libopenal.so
$(WEBOTS_HOME_LIB)/libopenal.so: $(WEBOTS_DEPENDENCY_PATH)/openal
@cp -a $(WEBOTS_DEPENDENCY_PATH)/openal/build/libopenal.so* $(WEBOTS_HOME_LIB)/
$(WEBOTS_DEPENDENCY_PATH)/openal:
@echo "# downloading $(OPENAL_PACKAGE)"
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(OPENAL_PACKAGE)
@wget -qq $(DEPENDENCIES_URL)/$(OPENAL_PACKAGE) -P $(WEBOTS_DEPENDENCY_PATH)
@if [ "$$(md5sum $(OPENAL_PACKAGE) | awk '{print $$1;}')" != "6c7c9a77dec67f42c51d0f035a94a090" ]; then echo "MD5 checksum failed for $(OPENAL_PACKAGE)"; exit 1; fi
@echo "# uncompressing $(OPENAL_PACKAGE)"
@tar xfm $(WEBOTS_DEPENDENCY_PATH)/$(OPENAL_PACKAGE) -C $(WEBOTS_DEPENDENCY_PATH)
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(OPENAL_PACKAGE)
ois-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/$(OIS_PACKAGE) $(WEBOTS_HOME_LIB)/libOIS* $(WEBOTS_HOME)/include/libOIS
ois: $(WEBOTS_HOME_LIB)/libOIS-1.4.0.so
$(WEBOTS_HOME_LIB)/libOIS-1.4.0.so: $(WEBOTS_DEPENDENCY_PATH)/$(OIS_PACKAGE)
@echo "# uncompressing $(OIS_PACKAGE)"
@tar xfm $(WEBOTS_DEPENDENCY_PATH)/$(OIS_PACKAGE) -C $(WEBOTS_HOME)
$(WEBOTS_DEPENDENCY_PATH)/$(OIS_PACKAGE):
@echo "# downloading $(OIS_PACKAGE)"
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(OIS_PACKAGE)
@wget -qq $(DEPENDENCIES_URL)/$(OIS_PACKAGE) -P $(WEBOTS_DEPENDENCY_PATH)
@if [ "$$(md5sum $(OIS_PACKAGE) | awk '{print $$1;}')" != "d1482733dce06f6dcc1c062c5c314185" ]; then echo "MD5 checksum failed for $(OIS_PACKAGE)"; exit 1; fi
@touch $(WEBOTS_DEPENDENCY_PATH)/$(OIS_PACKAGE)
assimp-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/$(ASSIMP_PACKAGE) $(WEBOTS_HOME_LIB)/libassimp* $(WEBOTS_HOME)/include/assimp
assimp: $(WEBOTS_HOME_LIB)/libassimp.so
$(WEBOTS_HOME_LIB)/libassimp.so: $(WEBOTS_DEPENDENCY_PATH)/$(ASSIMP_PACKAGE)
@echo "# uncompressing $(ASSIMP_PACKAGE)"
@tar xfm $(WEBOTS_DEPENDENCY_PATH)/$(ASSIMP_PACKAGE) -C $(WEBOTS_HOME)
$(WEBOTS_DEPENDENCY_PATH)/$(ASSIMP_PACKAGE):
@echo "# downloading $(ASSIMP_PACKAGE)"
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(ASSIMP_PACKAGE)
@wget -qq $(DEPENDENCIES_URL)/$(ASSIMP_PACKAGE) -P $(WEBOTS_DEPENDENCY_PATH)
@if [ "$$(md5sum $(ASSIMP_PACKAGE) | awk '{print $$1;}')" != "25f08ba04d580e8d81a387856d304f4c" ]; then echo "MD5 checksum failed for $(ASSIMP_PACKAGE)"; exit 1; fi
@touch $(WEBOTS_DEPENDENCY_PATH)/$(ASSIMP_PACKAGE)
pico-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE) $(WEBOTS_HOME_LIB)/libpico.so $(WEBOTS_HOME)/resources/pico $(WEBOTS_HOME)/include/libpico
pico: $(WEBOTS_HOME_LIB)/libpico.so
$(WEBOTS_HOME_LIB)/libpico.so: $(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE)
@echo "# uncompressing $(PICO_PACKAGE)"
@tar xfm $(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE) -C $(WEBOTS_HOME)
$(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE):
@echo "# downloading $(PICO_PACKAGE)"
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE)
@wget -qq $(DEPENDENCIES_URL)/$(PICO_PACKAGE) -P $(WEBOTS_DEPENDENCY_PATH)
@if [ "$$(md5sum $(PICO_PACKAGE) | awk '{print $$1;}')" != "13ce4d080f1db578cb2b73206b52e4cb" ]; then echo "MD5 checksum failed for $(PICO_PACKAGE)"; exit 1; fi
@touch $(WEBOTS_DEPENDENCY_PATH)/$(PICO_PACKAGE)
lua-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3 $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)
lua: $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3/src/liblua.a
$(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3:
@echo "# downloading $(LUA_PACKAGE)"
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)
@wget -qq https://www.lua.org/ftp/$(LUA_PACKAGE) -P $(WEBOTS_DEPENDENCY_PATH)
@if [ "$$(md5sum $(LUA_PACKAGE) | awk '{print $$1;}')" != "dc7f94ec6ff15c985d2d6ad0f1b35654" ]; then echo "MD5 checksum failed for $(LUA_PACKAGE)"; exit 1; fi
@echo "# uncompressing $(LUA_PACKAGE)"
@tar xfm $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE) -C $(WEBOTS_DEPENDENCY_PATH)
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(LUA_PACKAGE)
$(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3/src/liblua.a: $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3
@echo "# compiling lua"
+@make --silent -C $(WEBOTS_DEPENDENCY_PATH)/lua-5.2.3 linux 2> /dev/null
open-ssl-clean:
@rm -rf $(WEBOTS_DEPENDENCY_PATH)/openssl-1.1 $(WEBOTS_DEPENDENCY_PATH)/$(OPENSSL_PACKAGE) $(WEBOTS_HOME_LIB)/libcrypto.so* $(WEBOTS_HOME_LIB)/libssl.so*
open-ssl: $(WEBOTS_HOME_LIB)/libcrypto.so
$(WEBOTS_HOME_LIB)/libcrypto.so: $(WEBOTS_DEPENDENCY_PATH)/openssl-1.1
@cp -a $(WEBOTS_DEPENDENCY_PATH)/openssl-1.1/libcrypto.so* $(WEBOTS_HOME_LIB)
@cp -a $(WEBOTS_DEPENDENCY_PATH)/openssl-1.1/libssl.so* $(WEBOTS_HOME_LIB)
$(WEBOTS_DEPENDENCY_PATH)/openssl-1.1:
@echo "# downloading $(OPENSSL_PACKAGE)"
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(OPENSSL_PACKAGE)
@wget -qq $(DEPENDENCIES_URL)/$(OPENSSL_PACKAGE) -P $(WEBOTS_DEPENDENCY_PATH)
@if [ "$$(md5sum $(OPENSSL_PACKAGE) | awk '{print $$1;}')" != "f86af67eb474f562c14c16cfac100aa3" ]; then echo "MD5 checksum failed for $(OPENSSL_PACKAGE)"; exit 1; fi
@echo "# uncompressing $(OPENSSL_PACKAGE)"
@tar xfm $(WEBOTS_DEPENDENCY_PATH)/$(OPENSSL_PACKAGE) -C $(WEBOTS_DEPENDENCY_PATH)
@rm -f $(WEBOTS_DEPENDENCY_PATH)/$(OPENSSL_PACKAGE)
@touch $(WEBOTS_DEPENDENCY_PATH)/$(OPENSSL_PACKAGE)