-
Notifications
You must be signed in to change notification settings - Fork 13
/
compile-external-libs.sh
executable file
·48 lines (46 loc) · 1.75 KB
/
compile-external-libs.sh
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
#!/bin/bash -e
###############################################################################
### This script is called by (cd .. && make compile-external-libs). It will
### compile thirdparts cloned previously with make download-external-libs.
###
### To avoid pollution, these libraries are not installed in your operating
### system (no sudo make install is called). As consequence, you have to tell
### your project ../Makefile where to find their files. Here generic example:
### INCLUDES += -I$(THIRDPART)/thirdpart1/path1
### for searching heeder files.
### VPATH += $(THIRDPART)/thirdpart1/path1
### for searching c/c++ files.
### THIRDPART_LIBS += $(abspath $(THIRDPART)/libXXX.a))
### for linking your project against the lib.
### THIRDPART_OBJS += foo.o
### for inking your project against this file iff THIRDPART_LIBS is not
### used (the path is not important thanks to VPATH).
###
### The last important point to avoid polution, better to compile thirdparts as
### static library rather than shared lib to avoid telling your system where to
### find them when you'll start your application.
###############################################################################
### Library zlib-ng
print-compile zlib-ng
if [ -e zlib-ng ];
then
mkdir -p zlib-ng/build
(cd zlib-ng/build
call-cmake -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
call-make
)
else
echo "Failed compiling external/zipper: directory does not exist"
fi
### Library minizip
print-compile minizip
if [ -e minizip ];
then
mkdir -p minizip/build
(cd minizip/build
call-cmake -DUSE_AES=ON ..
call-make
)
else
echo "Failed compiling external/zipper: directory does not exist"
fi