Make: Compiling source code from a different directory.
Ken Spagnolo
KSpagnol at massey.ac.nz
Mon Nov 27 13:52:38 AEST 1989
We have several machines that all need to run the same code. Rather
than keep the source on each and worry about keeping them up to date,
I set up the makefile on our Sun 386i to access the source kept on
our Pyramid. This wasn't too difficult. I have an obj directory that
contains the makefile, and on the same level, a src directory that is
a symbolic link to the other machine. So the makefile defines SRCDIR
as ../src and uses the following rule to find everything:
%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) -c $<
It works fine on the Sun, but when I tried it on our new DECstation 3100,
it didn't work. Does anyone know of another way to achieve this? No
matter what I try, I get "Don't know how to make target". Thanx a lot.
--
Ken Spagnolo - Systems Programmer, Postmaster, Usenet Administrator, etc.
Computer Centre, Massey University, Palmerston North, New Zealand
K.Spagnolo at massey.ac.nz Phone: +64-63-69099 x8587 New Zealand = GMT+12
More information about the Comp.unix.questions
mailing list