home *** CD-ROM | disk | FTP | other *** search
- 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
- From: pal@xanadu.wpd.sgi.com (Anil Pal)
- Newsgroups: comp.sys.sgi
- Subject: Re: ? for make gurus
- Message-ID: <1993Jan26.235546.14693@odin.corp.sgi.com>
- Date: 26 Jan 93 23:55:46 GMT
- References: <1993Jan26.192554.15037@murdoch.acc.Virginia.EDU>
- Sender: news@odin.corp.sgi.com (Net News)
- Reply-To: pal@wpd.sgi.com
- Organization: Silicon Graphics, Inc.
- Lines: 32
- Nntp-Posting-Host: xanadu.wpd.sgi.com
- Cc: rg3h@uvacs.cs.Virginia.EDU
-
- In article <1993Jan26.192554.15037@murdoch.acc.Virginia.EDU>, rg3h@uvacs.cs.Virginia.EDU (Rich Gossweiler) writes:
- |> I'd like to put all my .o files in a separate subdirectory. On the
- |> suns, I use a macro as shown below:
- |>
- |>
- |> #
- |> # all the object files to be created
- |> #
- |> VR_OBJS = dynarray.o sock.o vr_comm.o \
- |> timing.o vr_init.o vr_draw.o \
- |>
- |> #
- |> # Rule substitution -- prepend the .o files with subdirectory "sunobj/"
- |> #
- |> VR_OBJECTS = $(VR_OBJS:%=sunobj/%)
-
- On the SGI, you can use smake, an enhanced make variant, which will do similar
- substitutions (although with a slightly different syntax)
-
- Thus,
-
- VR_OBJS = dynarray.o sock.o vr_comm.o \
- timing.o vr_init.o vr_draw.o
-
- VR_OBJECTS = $(OBJS:S/^/sgiobj\//g)
-
- THe man page for smake describes other possible substitutions, and
- other features that you may find useful.
-
- --
- Anil A. Pal
- pal@sgi.com (415)-390-5279
-