forked from marforic/imagemagick_lib_iphone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
all.sh
executable file
·50 lines (42 loc) · 1.19 KB
/
all.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
49
50
#!/bin/bash
if [[ $# != 1 ]]; then
echo "$0 takes 1 argument: the version of ImageMagick you want to compile!"
echo "EXAMPLE: $0 6.8.8-2"
exit
fi
export IM_VERSION="$1"
# Configuration / Function scripts
. $(dirname $0)/env.sh # environment variables
. $(dirname $0)/flags.sh # compiler flags
. $(dirname $0)/utils.sh # various functions
# Compilation scripts
. $(dirname $0)/compile_png.sh # libPNG
. $(dirname $0)/compile_jpeg.sh # JPEG
. $(dirname $0)/compile_tiff.sh # TIFF
. $(dirname $0)/compile_im.sh # ImageMagick
# --- CLEAN IS SPECIAL --- #
if [[ $1 == "clean" ]]; then
echo "Cleaning..."
rm *.log 2>/dev/null
rm -r ${TARGET_LIB_DIR}/ 2>/dev/null
rm -r ${FINAL_DIR}/ 2>/dev/null
echo "Done!"
exit 0
fi
# --- ZIP IS SPECIAL --- #
# Used by Claudio Marforio to generate zips for the imagemagick FTP
if [[ $1 == "zip" ]]; then
zip_for_ftp
exit 0
fi
# --- WHAT GETS EXECUTED --- #
prepare
for i in $ARCHS; do
png $i
jpeg $i
# Comment tiff build, because the best way to compile it is here https://github.com/ashtons/libtiff-ios
# If you still want to compile with this script, you have to remove several flags in flags.sh and compile_im.sh
# tiff $1
im $i
done
structure_for_xcode