Added a workspace directory with plug-in Makefile.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 7 Jul 2010 23:31:37 +0000 (19:31 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Wed, 7 Jul 2010 23:31:37 +0000 (19:31 -0400)
workspace/.gitignore [new file with mode: 0644]
workspace/Makefile [new file with mode: 0644]

diff --git a/workspace/.gitignore b/workspace/.gitignore
new file mode 100644 (file)
index 0000000..385fbbf
--- /dev/null
@@ -0,0 +1,3 @@
+# The Makefile in this directory is hand-written, not generated by
+# Automake
+!Makefile
diff --git a/workspace/Makefile b/workspace/Makefile
new file mode 100644 (file)
index 0000000..8a8839d
--- /dev/null
@@ -0,0 +1,30 @@
+# See README in this directory for more information about this
+# Makefile.
+
+CC=gcc
+CFLAGS=-Wall -Werror -O2
+
+INCLUDE=-I../src
+LIB_INTERASPECT=../src/.libs/libinteraspect.a
+
+all :
+       @echo Use \"make libhello.so\" to compile a plug-in named hello.c.
+       @echo See README in this directory for more information.
+
+clean :
+       -rm *.o lib*.so.1.0.0 lib*.so 2> /dev/null
+
+$(LIB_INTERASPECT) :
+       @echo Cannot find libinteraspect.a.
+       @echo Make sure InterAspect is compiled.
+       @echo You may need to check the README file to see how to pass the
+       @echo location of libinteraspect.a to this Makefile.
+       @false
+
+%.o : %.c
+       gcc $(CFLAGS) $(INCLUDE) -fPIC -c -o $@ $<
+
+lib%.so : %.o $(LIB_INTERASPECT)
+       gcc -shared -Wl,-soname,lib$*.so.1 -o lib$*.so $*.o $(LIB_INTERASPECT)
+
+.PHONY : all clean