home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10446 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  1.7 KB

  1. Path: sparky!uunet!gatech!hubcap!ncrcae!ncrlnk!usglnk!usdsd1!dkowalsk
  2. From: dkowalsk@usdsd1.DaytonOH.NCR.COM (Dennis Kowalski)
  3. Newsgroups: comp.unix.questions
  4. Subject: Make with multiple directories
  5. Message-ID: <1563@usdsd1.DaytonOH.NCR.COM>
  6. Date: 27 Aug 92 19:35:16 GMT
  7. Reply-To: dkowalsk@usdsd1.DaytonOH.NCR.COM (Dennis Kowalski)
  8. Distribution: world
  9. Organization: NCR USG Data Services Division
  10. Lines: 49
  11.  
  12.  
  13.  
  14.  The following is an example of one of our make files.
  15.  
  16. TARGET = $(SYSMAKE)vlidump
  17.  
  18. LIB =$(LIBS)
  19.  
  20. OFILES= \
  21.     vlidump.o
  22.  
  23.  
  24. $(TARGET):  $(OFILES) $(LIB)
  25.     $(CC) -o $@ $(OFILES) $(LIB)
  26.  
  27. vlidump.o: $(HFILES)     $(INCDIR)/str2.h
  28.  
  29.  
  30.  
  31.  
  32.   The LIBS variable is set prior to the make. This works fine.
  33.   
  34.   The INCDIR variable is set prior to the make. This works fine.
  35.  
  36.   The SYSMAKE variable is set to null or /some/dirname/ prior to the make
  37.   running. 
  38.   This results in the generated executable being written to the current
  39.   directory or to some other directory.
  40.   This works fine.
  41.  
  42.  
  43.   My new problem is a requirement to have the source files in directory A,
  44.   the make running in directory B, the .o files are to be written in 
  45.   directory B, and 
  46.   the executable writtten as before, either in the current directory (B)
  47.   or the $(SYSMAKE) directory (C).
  48.  
  49.  Anyone have any ideas how to do this??
  50.  
  51.   
  52. Dennis Kowalski         NCR Corporation  PCD-3                  (513) 445-1843
  53. Systems Architecture    1700 S. Patterson Blvd              VOICEplus 622-1843
  54. USG Data Services Div   Dayton, Ohio     45479
  55. Dennis.Kowalski@DaytonOH.NCR.COM
  56. -- 
  57. Dennis Kowalski         NCR Corporation  PCD-3                  (513) 445-1843
  58. Systems Architecture    1700 S. Patterson Blvd              VOICEplus 622-1843
  59. USG Data Services Div   Dayton, Ohio     45479
  60. Dennis.Kowalski@DaytonOH.NCR.COM
  61.