From: Michael Orlitzky Date: Sun, 19 Nov 2023 13:45:32 +0000 (-0500) Subject: examples/svgtiny_display_x11.c: update build instructions X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=864636d1ee1bfabe716d46697b097d577ba226f8;p=libsvgtiny.git examples/svgtiny_display_x11.c: update build instructions First, tell people to run "make" instead of giving them the full "gcc" command-line. Then elaborate on how one can modify the build process to use a development copy of libsvgtiny. --- diff --git a/examples/svgtiny_display_x11.c b/examples/svgtiny_display_x11.c index c2c0aad..ca74640 100644 --- a/examples/svgtiny_display_x11.c +++ b/examples/svgtiny_display_x11.c @@ -13,9 +13,38 @@ * main() - loads an SVG using svgtiny_create() and svgtiny_parse() * event_diagram_expose() - renders the SVG by stepping through the shapes * - * Compile using: - * gcc -g -W -Wall -o svgtiny_display_x11 svgtiny_display_x11.c \ - * `pkg-config --cflags --libs libsvgtiny cairo` -lX11 + * A GNUMakefile is provided to ease compilation. To build the example + * program against the system copy of libsvgtiny, you can simply run, + * + * $ make + * + * Or, if you are developing libsvgtiny and want to build against your + * local copy, you can run, + * + * $ CPPFLAGS="-I../include" make + * + * to ensure that your (local) copy of the headers are used. You will + * need to modify this further if libsvgtiny is not installed on the + * system where you're developing. In addition to the "-I" directive + * above, you'll need both + * + * CPPFLAGS="-L/path/to/your/libsvgtiny/build/directory" + * LIBS="-lsvgtiny" + * + * to tell your compiler to link against the local libsvgtiny and + * where to find it. + * + * Finally, when you want to _run_ the example program using your + * local copy of libsvgtiny (whether or not a system copy is + * installed), you'll need to set + * + * LD_LIBRARY_PATH=/path/to/your/libsvgtiny/build/directory + * + * The shared-library build directory is platform-specific, but it + * should look something like, + * + * build-x86_64-pc-linux-gnu-x86_64-pc-linux-gnu-release-lib-shared + * */