From: Justin Seyster Date: Fri, 13 Aug 2010 20:52:22 +0000 (-0400) Subject: Workspace directory now works correctly when using separate build dir. X-Git-Tag: release-v1.0~74^2~1 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=4e79125e7ddd1c1ddd030a927f539af4a0e35dbe;p=interaspect.git Workspace directory now works correctly when using separate build dir. --- diff --git a/configure.in b/configure.in index 4077534..f8ea9d2 100644 --- a/configure.in +++ b/configure.in @@ -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 index 8a8839d..0000000 --- a/workspace/Makefile +++ /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 index 0000000..84a0075 --- /dev/null +++ b/workspace/Makefile.in @@ -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 diff --git a/workspace/README b/workspace/README index d21eb4a..a656ec7 100644 --- a/workspace/README +++ b/workspace/README @@ -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