File tree 3 files changed +31
-21
lines changed
3 files changed +31
-21
lines changed Original file line number Diff line number Diff line change @@ -8,26 +8,6 @@ OUTPUT_PREFIX=_build/amalgamation
8
8
9
9
cmake -H. -B_build -DAMALGAMATE_SOURCES=ON -G" Unix Makefiles"
10
10
11
- echo " int main() { return 0; }" > main.c
12
- echo " Test compile with GCC..."
13
- gcc -pedantic -Wall -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out
14
- echo " Test compile with GCC ANSI..."
15
- gcc -ansi -pedantic -Wall -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out
16
- if command -v clang
17
- then
18
- echo " Test compile with clang..."
19
- clang -Wall -Wpedantic -fsanitize=unsigned-integer-overflow -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out
20
- fi
21
- for def in MINIZ_NO_STDIO MINIZ_NO_TIME MINIZ_NO_DEFLATE_APIS MINIZ_NO_INFLATE_APIS MINIZ_NO_ARCHIVE_APIS MINIZ_NO_ARCHIVE_WRITING_APIS MINIZ_NO_ZLIB_APIS MINIZ_NO_ZLIB_COMPATIBLE_NAMES MINIZ_NO_MALLOC
22
- do
23
- echo " Test compile with GCC and define $def ..."
24
- gcc -ansi -pedantic -Wall -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out -D${def}
25
- done
26
- echo " Test compile with GCC and MINIZ_USE_UNALIGNED_LOADS_AND_STORES=1..."
27
- gcc -ansi -pedantic -Wall -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out -DMINIZ_USE_UNALIGNED_LOADS_AND_STORES=1
28
- rm test.out
29
- rm main.c
30
-
31
11
cp $OUTPUT_PREFIX /miniz.* amalgamation/
32
12
cp ChangeLog.md amalgamation/
33
13
cp LICENSE amalgamation/
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ source ./amalgamate.sh
6
+
7
+ echo " int main() { return 0; }" > main.c
8
+ echo " Test compile with GCC..."
9
+ gcc -pedantic -Wall -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out
10
+ echo " Test compile with GCC ANSI..."
11
+ gcc -ansi -pedantic -Wall -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out
12
+ if command -v clang
13
+ then
14
+ echo " Test compile with clang..."
15
+ clang -Wall -Wpedantic -fsanitize=unsigned-integer-overflow -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out
16
+ fi
17
+ for def in MINIZ_NO_STDIO MINIZ_NO_TIME MINIZ_NO_DEFLATE_APIS MINIZ_NO_INFLATE_APIS MINIZ_NO_ARCHIVE_APIS MINIZ_NO_ARCHIVE_WRITING_APIS MINIZ_NO_ZLIB_APIS MINIZ_NO_ZLIB_COMPATIBLE_NAMES MINIZ_NO_MALLOC
18
+ do
19
+ echo " Test compile with GCC and define $def ..."
20
+ gcc -ansi -pedantic -Wall -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out -D${def}
21
+ done
22
+ echo " Test compile with GCC and MINIZ_USE_UNALIGNED_LOADS_AND_STORES=1..."
23
+ gcc -ansi -pedantic -Wall -I$OUTPUT_PREFIX main.c $OUTPUT_PREFIX /miniz.c -o test.out -DMINIZ_USE_UNALIGNED_LOADS_AND_STORES=1
24
+ rm test.out
25
+ rm main.c
26
+
27
+ echo " Amalgamation verified."
28
+
29
+
30
+
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
- . amalgamate .sh
5
+ . amalgamate_and_verify .sh
6
6
7
7
cat << "EOF " > miniz_export.h
8
8
#ifndef MINIZ_EXPORT
You can’t perform that action at this time.
0 commit comments