Workspace directory now works correctly when using separate build dir.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Fri, 13 Aug 2010 20:52:22 +0000 (16:52 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Fri, 13 Aug 2010 20:52:22 +0000 (16:52 -0400)
configure.in
workspace/Makefile [deleted file]
workspace/Makefile.in [new file with mode: 0644]
workspace/README

index 407753485687493c11d1b82a0665d02bfe577c72..f8ea9d28860667f792ddfde583a922c70f114abb 100644 (file)
@@ -21,6 +21,7 @@ AC_PROG_LIBTOOL
 AX_GCC_PLUGIN
 
 AC_CONFIG_FILES([Makefile
-                 src/Makefile])
+                 src/Makefile
+                workspace/Makefile])
 
 AC_OUTPUT
diff --git a/workspace/Makefile b/workspace/Makefile
deleted file mode 100644 (file)
index 8a8839d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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
diff --git a/workspace/Makefile.in b/workspace/Makefile.in
new file mode 100644 (file)
index 0000000..84a0075
--- /dev/null
@@ -0,0 +1,37 @@
+# See README in this directory for more information about this
+# Makefile.
+
+CC=gcc
+CFLAGS=-Wall -Werror -O2
+
+INCLUDE=@top_srcdir@/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 can manually specify the location of libinteraspect.a
+       @echo by setting the LIB_INTERASPECT variable.
+       @false
+
+$(INCLUDE)/aop.h :
+       @echo Cannot find aop.h.
+       @echo If you moved this Makefile to outside your build directory, you
+       @echo will need to manually specify the location of the InterAspect src
+       @echo directory by setting the INCLUDE variable.
+       @false
+
+%.o : %.c $(INCLUDE)/aop.h
+       $(CC) $(CFLAGS) -I$(INCLUDE) -fPIC -c -o $@ $<
+
+lib%.so : %.o $(LIB_INTERASPECT)
+       $(CC) -shared -Wl,-soname,lib$*.so.1 -o lib$*.so $*.o $(LIB_INTERASPECT)
+
+.PHONY : all clean
index d21eb4adaa41ad4b6cdc6382a3cae00cfc6a6484..a656ec74b4631053578d1a509bae617e22e6b369 100644 (file)
@@ -8,9 +8,3 @@ 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