diff --git a/example/peterface/peterface.c b/example/peterface/peterface.c index 7cb12059..de6d8653 100644 --- a/example/peterface/peterface.c +++ b/example/peterface/peterface.c @@ -23,6 +23,9 @@ for a C compiler $cc, such as clang or gcc. #include #include +// If building this program in an environment that doesn't easily accomodate +// relative includes, you can use the script/inline-c-relative-includes.go +// program to generate a stand-alone C file. #include "../../gen/c/std/gif.c" #ifdef __linux__ diff --git a/test/c/std/flate.c b/test/c/std/flate.c index 0f5410f4..af4f77cf 100644 --- a/test/c/std/flate.c +++ b/test/c/std/flate.c @@ -37,8 +37,14 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the // !! wuffs mimic cflags: -DWUFFS_MIMIC -lz +// If building this program in an environment that doesn't easily accomodate +// relative includes, you can use the script/inline-c-relative-includes.go +// program to generate a stand-alone C file. #include "../../../gen/c/std/flate.c" #include "../testlib/testlib.c" +#ifdef WUFFS_MIMIC +#include "../mimiclib/flate.c" +#endif // ---------------- Golden Tests @@ -686,8 +692,6 @@ void test_wuffs_zlib_decode_pi() { #ifdef WUFFS_MIMIC -#include "../mimiclib/flate.c" - void test_mimic_flate_decode_256_bytes() { CHECK_FOCUS(__func__); do_test_buf1_buf1(mimic_flate_decode, &flate_256_bytes_gt, 0, 0); diff --git a/test/c/std/gif.c b/test/c/std/gif.c index 154237d9..469679ce 100644 --- a/test/c/std/gif.c +++ b/test/c/std/gif.c @@ -37,8 +37,14 @@ the first "./a.out" with "./a.out -bench". Combine these changes with the // !! wuffs mimic cflags: -DWUFFS_MIMIC -lgif +// If building this program in an environment that doesn't easily accomodate +// relative includes, you can use the script/inline-c-relative-includes.go +// program to generate a stand-alone C file. #include "../../../gen/c/std/gif.c" #include "../testlib/testlib.c" +#ifdef WUFFS_MIMIC +#include "../mimiclib/gif.c" +#endif // ---------------- Basic Tests @@ -562,8 +568,6 @@ void test_wuffs_gif_decode_input_is_a_png() { #ifdef WUFFS_MIMIC -#include "../mimiclib/gif.c" - bool do_test_mimic_gif_decode(const char* filename) { wuffs_base__buf1 src = {.ptr = global_src_buffer, .len = BUFFER_SIZE}; if (!read_file(&src, filename)) {