]> sigrok.org Git - libserialport.git/blobdiff - examples/README
Add examples directory with two example programs.
[libserialport.git] / examples / README
diff --git a/examples/README b/examples/README
new file mode 100644 (file)
index 0000000..1b8d2fe
--- /dev/null
@@ -0,0 +1,24 @@
+This directory contains example programs showing how to use libserialport.
+
+The examples currently included are:
+
+list_ports.c - displays a list of ports on the system.
+port_info.c - displays info about a particular port on the system.
+
+The programs themselves are completely OS-independent, and require only a
+C compiler and libserialport.
+
+The Makefile in this directory will attempt to build all the examples,
+using 'gcc' to compile them and 'pkg-config' to discover the include
+paths and linker settings needed to build with libserialport. It provides
+a minimal example of how to write a Makefile to build a program using
+libserialport.
+
+If you have make, gcc, pkg-config and libserialport installed correctly
+then running 'make' should build the example programs in this directory.
+If this doesn't work, you may need to modify the Makefile or set necessary
+paths in your environment to suit your system.
+
+You can also build these examples using any other compiler, IDE or build
+system. You just need the libserialport.h header available to compile them,
+and the libserialport library available to link and run them.