home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sgi / 19147 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.5 KB

  1. Path: sparky!uunet!tcsi.com!iat.holonet.net!news.cerf.net!usc!howland.reston.ans.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!olivea!sgigate!odin!xanadu.wpd.sgi.com!pal
  2. From: pal@xanadu.wpd.sgi.com (Anil Pal)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: ? for make gurus
  5. Message-ID: <1993Jan26.235546.14693@odin.corp.sgi.com>
  6. Date: 26 Jan 93 23:55:46 GMT
  7. References: <1993Jan26.192554.15037@murdoch.acc.Virginia.EDU>
  8. Sender: news@odin.corp.sgi.com (Net News)
  9. Reply-To: pal@wpd.sgi.com
  10. Organization: Silicon Graphics, Inc.
  11. Lines: 32
  12. Nntp-Posting-Host: xanadu.wpd.sgi.com
  13. Cc: rg3h@uvacs.cs.Virginia.EDU
  14.  
  15. In article <1993Jan26.192554.15037@murdoch.acc.Virginia.EDU>, rg3h@uvacs.cs.Virginia.EDU (Rich Gossweiler) writes:
  16. |> I'd like to put all my .o files in a separate subdirectory.  On the
  17. |> suns, I use a macro as shown below:
  18. |> 
  19. |> 
  20. |> #
  21. |> # all the object files to be created
  22. |> #
  23. |> VR_OBJS        = dynarray.o    sock.o        vr_comm.o    \
  24. |>         timing.o    vr_init.o    vr_draw.o    \
  25. |> 
  26. |> #
  27. |> # Rule substitution -- prepend the .o files with subdirectory "sunobj/"
  28. |> #
  29. |> VR_OBJECTS    = $(VR_OBJS:%=sunobj/%)
  30.  
  31. On the SGI, you can use smake, an enhanced make variant, which will do similar
  32. substitutions (although with a slightly different syntax)
  33.  
  34. Thus,
  35.  
  36.     VR_OBJS = dynarray.o    sock.o          vr_comm.o       \
  37.           timing.o      vr_init.o       vr_draw.o 
  38.  
  39.     VR_OBJECTS = $(OBJS:S/^/sgiobj\//g)
  40.  
  41. THe man page for smake describes other possible substitutions, and
  42. other features that you may find useful.
  43.  
  44. -- 
  45. Anil A. Pal
  46. pal@sgi.com    (415)-390-5279
  47.