Documentation for the new workspace feature.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 7 Jul 2010 23:56:06 +0000 (19:56 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 7 Jul 2010 23:56:06 +0000 (19:56 -0400)
INSTALL
workspace/README [new file with mode: 0644]

diff --git a/INSTALL b/INSTALL
index 58e7d39171e0e660e96d1f5c29c9e64fac017e31..f934759ac2637f9bf87b7d1da6a6c01ce7c68260 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -137,3 +137,32 @@ normally:
 # plug-ins, we recommend compiling with these CFLAGS to turn on
 # debugging support for the InterAspect library.
 make CFLAGS='-g -O0'
+
+--------
+4. Building an InterAspect Plug-in
+---
+
+The easiest way to get started writing InterAspect plug-ins is to use
+the Makefile provided in the workspace/ directory.  Write your plug-in
+as a single C file and place it in the workspace/ directory.
+
+You can compile a plug-in named hello.c by typing:
+
+# Again, you only need the CFLAGS if you want debugging support.
+make libhello.so CFLAGS='-g -O0'
+
+This pattern will work for any *.c file.
+
+--------
+5. Using an InterAspect Plug-in
+---
+
+Once you have compiled your plug-in into a .so file, you can tell GCC
+to use it with the -fplugin option:
+
+$PLUGIN_BASE/install-plugin/bin/gcc -fplugin=path/to/libhello.so
+  -o instrumented-program file1.c file2.c
+
+All the other GCC options are the same as usual.  Also, you do not
+need to specify -fplugin for your linking step (if you have a separate
+linking step).
diff --git a/workspace/README b/workspace/README
new file mode 100644 (file)
index 0000000..d21eb4a
--- /dev/null
@@ -0,0 +1,16 @@
+This workspace directory is intended as a convenient way to get
+started writing InterAspect plug-ins.  Just write your plug-in as a C
+file in this directory and compile it using the included Makefile.
+The Makefile has pattern rules that let it compile any *.c into a
+lib*.so plug-in file.
+
+There is already a Hello World plug-in named hello.c.  You can compile
+it with the make command:
+
+make libhello.so
+
+Note that if you build InterAspect in another directory (separate from
+the source directory), you have to specify the location of the
+finished library to the Makefile.
+
+make LIB_INTERASPECT=$IA_BUILD_DIR/src/.libs/interaspect.a libhello.so