]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - Plugson/build.sh
Update italian strings (#2465)
[Ventoy.git] / Plugson / build.sh
1 #!/bin/bash
2
3 if [ "$1" = "sim" ]; then
4 exopt="-DVENTOY_SIM"
5 fi
6
7 build_func() {
8 libsuffix=$2
9 toolDir=$3
10
11 XXFLAG='-std=gnu99 -D_FILE_OFFSET_BITS=64 -O2'
12 XXLIB=""
13
14 echo "CC=$1 libsuffix=$libsuffix toolDir=$toolDir"
15
16 echo "CC civetweb.o"
17 $1 $XXFLAG -c -Wall -Wextra -Wshadow -Wformat-security -Winit-self \
18 -Wmissing-prototypes -DLINUX \
19 -I./src/Lib/libhttp/include \
20 -DNDEBUG -DNO_CGI -DNO_CACHING -DNO_SSL -DSQLITE_DISABLE_LFS -DSSL_ALREADY_INITIALIZED \
21 -DUSE_STACK_SIZE=102400 -DNDEBUG -fPIC \
22 ./src/Lib/libhttp/include/civetweb.c \
23 -o ./civetweb.o
24
25 echo "CC plugson.o"
26 $1 $XXFLAG $exopt -Wall -Wno-unused-function -DSTATIC=static -DINIT= \
27 -I./src \
28 -I./src/Core \
29 -I./src/Web \
30 -I./src/Include \
31 -I./src/Lib/libhttp/include \
32 -I./src/Lib/fat_io_lib/include \
33 -I./src/Lib/xz-embedded/linux/include \
34 -I./src/Lib/xz-embedded/linux/include/linux \
35 -I./src/Lib/xz-embedded/userspace \
36 -I ./src/Lib/exfat/src/libexfat \
37 -I ./src/Lib/exfat/src/mkfs \
38 -I ./src/Lib/fat_io_lib \
39 \
40 -L ./src/Lib/fat_io_lib/lib \
41 src/main_linux.c \
42 src/Core/ventoy_crc32.c \
43 src/Core/ventoy_disk.c \
44 src/Core/ventoy_disk_linux.c \
45 src/Core/ventoy_json.c \
46 src/Core/ventoy_log.c \
47 src/Core/ventoy_md5.c \
48 src/Core/ventoy_utf.c \
49 src/Core/ventoy_util.c \
50 src/Core/ventoy_util_linux.c \
51 src/Web/*.c \
52 src/Lib/xz-embedded/linux/lib/decompress_unxz.c \
53 src/Lib/fat_io_lib/*.c \
54 $XXLIB \
55 -l pthread \
56 ./civetweb.o \
57 -o Plugson$libsuffix
58
59 rm -f *.o
60
61 if [ "$libsuffix" = "aa64" ]; then
62 aarch64-linux-gnu-strip Plugson$libsuffix
63 elif [ "$libsuffix" = "m64e" ]; then
64 mips-linux-gnu-strip Plugson$libsuffix
65 else
66 strip Plugson$libsuffix
67 fi
68
69 rm -f ../INSTALL/tool/$toolDir/Plugson
70 cp -a Plugson$libsuffix ../INSTALL/tool/$toolDir/Plugson
71
72 }
73
74 build_func "gcc" '64' 'x86_64'
75 build_func "gcc -m32" '32' 'i386'
76 build_func "aarch64-linux-gnu-gcc" 'aa64' 'aarch64'
77 build_func "mips-linux-gnu-gcc -mips64r2 -mabi=64" 'm64e' 'mips64el'
78