-
Notifications
You must be signed in to change notification settings - Fork 203
/
crossbuild.bat
76 lines (68 loc) · 2.27 KB
/
crossbuild.bat
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
set MY_INCLUDE=%~dp0include
set C_INCLUDE_PATH=%MY_INCLUDE%
set CPLUS_INCLUDE_PATH=%MY_INCLUDE%
rem aarch64_be-linux-gnu
rem aarch64_be-linux-musl
rem aarch64_be-windows-gnu
rem aarch64-linux-gnu
rem aarch64-linux-musl
rem aarch64-windows-gnu
rem armeb-linux-gnueabi
rem armeb-linux-gnueabihf
rem armeb-linux-musleabi
rem armeb-linux-musleabihf
rem armeb-windows-gnu
rem arm-linux-gnueabi
rem arm-linux-gnueabihf
rem arm-linux-musleabi
rem arm-linux-musleabihf
rem arm-windows-gnu
rem i386-linux-gnu
rem i386-linux-musl
rem i386-windows-gnu
rem mips64el-linux-gnuabi64
rem mips64el-linux-gnuabin32
rem mips64el-linux-musl
rem mips64-linux-gnuabi64
rem mips64-linux-gnuabin32
rem mips64-linux-musl
rem mipsel-linux-gnu
rem mipsel-linux-musl
rem mips-linux-gnu
rem mips-linux-musl
rem powerpc64le-linux-gnu
rem powerpc64le-linux-musl
rem powerpc64-linux-gnu
rem powerpc64-linux-musl
rem powerpc-linux-gnu
rem powerpc-linux-musl
rem riscv64-linux-gnu
rem riscv64-linux-musl
rem s390x-linux-gnu
rem s390x-linux-musl
rem sparc-linux-gnu
rem sparcv9-linux-gnu
rem wasm32-freestanding-musl
rem x86_64-linux-gnu
rem x86_64-linux-gnux32
rem x86_64-linux-musl
rem x86_64-windows-gnu
set CC=zig c++
set TARGET=mipsel-linux-musl
set OPATH=%TARGET%
set YH=-target %TARGET% -Wall -fexceptions -O3 -DOPENSSL=1 -DOPENSSLDL=1
mkdir %OPATH%
del %OPATH%\*.o
%CC% %YH% -c cJSON.c -o %OPATH%/cJSON.o
%CC% %YH% -c main.cpp -o %OPATH%/main.o
%CC% %YH% -c sendmsg.cpp -o %OPATH%/sendmsg.o
%CC% %YH% -c param.cpp -o %OPATH%/param.o
%CC% %YH% -c udp.cpp -o %OPATH%/udp.o
%CC% %YH% -c base64.c -o %OPATH%/base64.o
%CC% %YH% -c nonblocking.cpp -o %OPATH%/nonblocking.o
%CC% %YH% -c global.cpp -o %OPATH%/global.o
%CC% %YH% -c opensslbio.cpp -o %OPATH%/opensslbio.o
%CC% %YH% -c openssldl.cpp -o %OPATH%/openssldl.o
%CC% %YH% -c ngrok.cpp -o %OPATH%/ngrok.o
rem %CC% %OPATH%\main.o %OPATH%\sendmsg.o %OPATH%\cJSON.o %OPATH%/opensslbio.o %OPATH%\base64.o %OPATH%\udp.o %OPATH%\nonblocking.o -o %OPATH%\ngrokc
%CC% %YH% -s %OPATH%\main.o %OPATH%\sendmsg.o %OPATH%\param.o %OPATH%\ngrok.o %OPATH%/opensslbio.o %OPATH%\cJSON.o %OPATH%\base64.o %OPATH%\udp.o %OPATH%\nonblocking.o %OPATH%\openssldl.o %OPATH%\global.o -o %OPATH%\ngrokc