On Saturday, June 25, 2011 03:47:56 PM you wrote: > Hi Paul, > > you may try: > > DIR = $(top_srcdir)/../other/src > > to refer to that directory. >
I have moved all my .c and .h source to a defferent directory from the one wherein I am building. I now get a lot of error messages of the form: "linker input file unused because linking not done" What am I doing wrong? Do I need some kind of flag to tell gcc where to look? Thank You. I now have the source and the include files in a different read only directroy: I am building a library: --------from my Makefile.am------------- > astrosrc = $(astrodienst)/src > lib_LTLIBRARIES = libswe.la > > > libswe_la_SOURCES = \ > > $(astrosrc)/swecl.c \ > $(astrosrc)/swedate.c \ > $(astrosrc)/swedate.h \ > $(astrosrc)/swedll.h \ > $(astrosrc)/swehel.c \ > $(astrosrc)/swehouse.c \ > $(astrosrc)/swehouse.h \ > $(astrosrc)/swejpl.c \ > $(astrosrc)/swejpl.h \ > $(astrosrc)/swemmoon.c \ > $(astrosrc)/swemplan.c \ > $(astrosrc)/swenut2000a.h \ > $(astrosrc)/sweodef.h \ > $(astrosrc)/swepcalc.c \ > $(astrosrc)/swepcalc.h \ > $(astrosrc)/swepdate.c \ > $(astrosrc)/sweph.c \ > $(astrosrc)/sweph.h \ > $(astrosrc)/swephexp.h \ > $(astrosrc)/swephlib.c \ > $(astrosrc)/swephlib.h > > libswe_la_CFLAGS = \ > > -lm > > libswe_la_LDFLAGS = > > libswe_la_LIBADD = > include_HEADERS = \ > > $(astrosrc)/sweodef.h\ > $(astrosrc)/swephexp.h > > pkgconfigdir = $(libdir)/pkgconfig > pkgconfig_DATA = libswe-1.77.00.pc > > EXTRA_DIST = \ > > libswe-1.77.00.pc.in\ > $(astrosrc)/swemptab.c > > INCLUDES = \ > > $(astrodienst)/src > > bin_PROGRAMS = \ > > swetest\ > swemini > > swemini_SOURCES = \ > > $(astrosrc)/swemini.c > > swemini_LDADD = \ > > libswe.la > > swetest_SOURCES = \ > > $(astrosrc)/swetest.c > > swetest_LDADD = \ > > libswe.la > include_HEADERS = \ > > $(astrosrc)/sweodef.h\ > $(astrosrc)/swephexp.h > > pkgconfigdir = $(libdir)/pkgconfig > pkgconfig_DATA = libswe-1.77.00.pc > > EXTRA_DIST = \ > > libswe-1.77.00.pc.in\ > $(astrosrc)/swemptab.c > > INCLUDES = \ > > $(astrodienst)/src > > bin_PROGRAMS = \ > > swetest\ > swemini > > swemini_SOURCES = \ > > $(astrosrc)/swemini.c > > swemini_LDADD = \ > > libswe.la > > swetest_SOURCES = \ > > $(astrosrc)/swetest.c > > swetest_LDADD = \ > > libswe.la After making this change I get a lot of messages of the form: linker input file unused because linking not done --sample error message. > CC libswe_la-swecl.lo > > gcc: ../astrodienst/src: linker input file unused because linking not done > > CC libswe_la-swedate.lo > > gcc: ../astrodienst/src: linker input file unused because linking not done > > CC libswe_la-swehel.lo > > gcc: ../astrodienst/src: linker input file unused because linking not done -------------origianl message------------------- > Cheers > Marcelo > > 2011/6/25 Paul Elliott <pelli...@blackpatchpanel.com> > > > I need to keep my source files (i.e. .c and .h ) in a different directory > > tree > > from the one that contains the autotools control files and the build > > directory. > > > > That is, when building X.o or X.lo I need to tell it to always find the > > source > > file as > > ../other/src/X.c not ./X.c. I do not control the contents of the > > ../other/src/ > > directory > > so I can not create any Autotools control files there or any object files > > there. > > To me, that directory is read only. > > > > Is there a way to do this conveniently in automake? An implicit rule > > perhaps? > > > > Thank You. > > > > > > -- > > Paul Elliott 1(512)837-1096 > > pelli...@blackpatchpanel.com PMB 181, 11900 Metric Blvd > > Suite J > > http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117
signature.asc
Description: This is a digitally signed message part.