-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake
More file actions
executable file
·153 lines (149 loc) · 4.13 KB
/
make
File metadata and controls
executable file
·153 lines (149 loc) · 4.13 KB
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
#!/usr/bin/env bash
# This file is part of the Fun programming language.
# https://fun-lang.xyz/
#
# Copyright 2025 Johannes Findeisen <you@hanez.org>
# Licensed under the terms of the Apache-2.0 license.
# https://opensource.org/license/apache-2-0
#
# Added: 2025-12-12
if [ -z "$1" ]; then
echo "Build target is unset, using 'minimal'";
target="minimal";
else
echo "Build target is set to '$1'";
target=$1;
fi
if [ "$target" = "all" ]; then
rm -rf build \
&& cmake -S . -B build \
-DFUN_WITH_PCSC=ON \
-DFUN_WITH_REPL=ON \
-DFUN_WITH_SQLITE=ON \
-DFUN_WITH_CURL=ON \
-DFUN_WITH_PCRE2=ON \
-DFUN_WITH_XML2=ON \
-DFUN_WITH_JSON=ON \
-DFUN_WITH_INI=ON \
-DFUN_WITH_CPP=ON \
-DFUN_WITH_OPENSSL=ON \
&& cmake --build build --target fun
elif [ "$target" = "all_debug" ]; then
rm -rf build \
&& cmake -S . -B build \
-DFUN_WITH_PCSC=ON \
-DFUN_WITH_REPL=ON \
-DFUN_WITH_SQLITE=ON \
-DFUN_WITH_CURL=ON \
-DFUN_WITH_PCRE2=ON \
-DFUN_WITH_XML2=ON \
-DFUN_WITH_JSON=ON \
-DFUN_WITH_INI=ON \
-DFUN_WITH_CPP=ON \
-DFUN_WITH_OPENSSL=ON \
-DFUN_DEBUG=ON \
&& cmake --build build --target fun
elif [ "$target" = "alpine" ]; then
rm -rf build \
&& cmake -S . -B build \
-DFUN_WITH_REPL=ON \
-DFUN_WITH_SQLITE=ON \
-DFUN_WITH_CURL=ON \
-DFUN_WITH_PCRE2=ON \
-DFUN_WITH_XML2=ON \
-DFUN_WITH_JSON=ON \
-DFUN_WITH_INI=ON \
-DFUN_WITH_CPP=ON \
-DFUN_WITH_OPENSSL=ON \
&& cmake --build build --target fun
elif [ "$target" = "cpp_all" ]; then
rm -rf build \
&& cmake -S . -B build \
-DFUN_WITH_PCSC=ON \
-DFUN_WITH_REPL=ON \
-DFUN_WITH_SQLITE=ON \
-DFUN_WITH_CURL=ON \
-DFUN_WITH_PCRE2=ON \
-DFUN_WITH_XML2=ON \
-DFUN_WITH_JSON=ON \
-DFUN_WITH_INI=ON \
-DFUN_WITH_CPP=ON \
-DFUN_WITH_OPENSSL=ON \
&& cmake --build build --target fun
elif [ "$target" = "cpp_minimal" ]; then
rm -rf build \
&& cmake -S . -B build \
-DFUN_WITH_CPP=ON \
&& cmake --build build --target fun
elif [ "$target" = "ctest" ]; then
rm -rf build \
&& cmake -S . -B build \
&& cmake --build build --target fun \
&& (cd ./build/ \
&& ctest --output-on-failure -R crypto)
elif [ "$target" = "debug" ]; then
rm -rf build \
&& cmake -S . -B build \
-DFUN_WITH_REPL=ON \
-DFUN_DEBUG=ON \
&& cmake --build build --target fun
elif [ "$target" = "freebsd" ]; then
rm -rf build \
&& cmake -S . -B build \
-DFUN_WITH_REPL=ON \
&& cmake --build build --target fun
elif [ "$target" = "install" ]; then
sudo cmake --build build --target install
elif [ "$target" = "minimal" ]; then
rm -rf build \
&& cmake -S . -B build \
&& cmake --build build --target fun
elif [ "$target" = "musl" ]; then
rm -rf build \
&& cmake -S . -B build \
-DFUN_WITH_REPL=ON \
-DFUN_USE_MUSL=ON \
&& cmake --build build --target fun
elif [ "$target" = "repl" ]; then
rm -rf build \
&& cmake -S . -B build \
-DFUN_WITH_REPL=ON \
&& cmake --build build --target fun
elif [ "$target" = "rust_all" ]; then
rm -rf build && rm -rf src/rust/target \
&& cmake -S . -B build \
-DFUN_WITH_PCSC=ON \
-DFUN_WITH_REPL=ON \
-DFUN_WITH_SQLITE=ON \
-DFUN_WITH_CURL=ON \
-DFUN_WITH_PCRE2=ON \
-DFUN_WITH_XML2=ON \
-DFUN_WITH_JSON=ON \
-DFUN_WITH_INI=ON \
-DFUN_WITH_RUST=ON \
-DFUN_WITH_CPP=ON \
-DFUN_WITH_OPENSSL=ON \
-DFUN_DEBUG=OFF \
&& cmake --build build --target fun
elif [ "$target" = "rust_minimal" ]; then
rm -rf build && rm -rf src/rust/target \
&& cmake -S . -B build \
-DFUN_WITH_RUST=ON \
&& cmake --build build --target fun
else
echo "Build target $target not found... aborting!";
echo "Available targets:";
echo " - all";
echo " - all_debug";
echo " - alpine";
echo " - cpp_all";
echo " - cpp_minimal";
echo " - debug";
echo " - freebsd";
echo " - install";
echo " - minimal";
echo " - musl";
echo " - repl";
echo " - rust_all";
echo " - rust_minimal";
fi