Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!samsung!munnari.oz.au!comp.vuw.ac.nz!massey!KSpagnol From: KSpagnol@massey.ac.nz (Ken Spagnolo) Newsgroups: comp.unix.questions Subject: Make: Compiling source code from a different directory. Message-ID: <404@massey.ac.nz> Date: 27 Nov 89 02:52:38 GMT Reply-To: K.Spagnolo@massey.ac.nz (Ken Spagnolo) Organization: Massey University, Palmerston North, New Zealand Lines: 18 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@massey.ac.nz Phone: +64-63-69099 x8587 New Zealand = GMT+12