3 # Try building the example programs: in 32-bit and 64-bit mode, in C and C++
4 # mode, and for Linux and for Windows. Also run the Linux versions to make sure
13 COMMON_FLAGS="-Wall -Wextra -Werror -Wundef -Wno-unused-parameter -Wvla"
14 COMMON_CFLAGS="$COMMON_FLAGS -std=gnu99 -Wdeclaration-after-statement -Wstrict-prototypes"
15 COMMON_CXXFLAGS="$COMMON_FLAGS"
17 TEST_WIM="$HOME/data/test.wim"
18 TESTDATA="$HOME/data/testdata"
24 trap "rm -rf \"$tmpdir\" \"$tmpfile\" \"$tmpfile2\"" EXIT
29 ./applywim "$TEST_WIM" "$tmpdir"
30 ./capturewim "$tmpdir" "$tmpfile"
31 ./updatewim "$tmpfile" "examples" .
33 ./compressfile "$TESTDATA" "$tmpfile"
34 ./decompressfile "$tmpfile" "$tmpfile2"
35 cmp "$tmpfile2" "$TESTDATA"
37 ./compressfile "$TESTDATA" "$tmpfile" XPRESS 16384
38 ./decompressfile "$tmpfile" "$tmpfile2"
39 cmp "$tmpfile2" "$TESTDATA"
42 make CC=gcc CFLAGS="$COMMON_CFLAGS"
45 make CC=g++ CFLAGS="$COMMON_CXXFLAGS"
49 make CC=i686-w64-mingw32-gcc CFLAGS="$COMMON_CFLAGS -I../include -municode" LDLIBS="-lwim-15" LDFLAGS="-L/j/wimlib"
51 make CC=i686-w64-mingw32-g++ CFLAGS="$COMMON_CXXFLAGS -I../include -municode" LDLIBS="-lwim-15" LDFLAGS="-L/j/wimlib"
54 make CC=x86_64-w64-mingw32-gcc CFLAGS="$COMMON_CFLAGS -I../include -municode" LDLIBS="-lwim-15" LDFLAGS="-L/j/x64"
56 make CC=x86_64-w64-mingw32-g++ CFLAGS="$COMMON_CXXFLAGS -I../include -municode" LDLIBS="-lwim-15" LDFLAGS="-L/j/x64"