home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.misc
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!news.ysu.edu!malgudi.oar.net!chemabs!lwv26
- From: lwv26@cas.org (Larry W. Virden)
- Subject: Sun make rules for libraries?
- Message-ID: <1992Jul28.182912.6845@cas.org>
- Sender: usenet@cas.org
- Reply-To: lvirden@cas.org (Larry W. Virden)
- Organization: Nedriv Software and Shoe Shiners, Uninc.
- Date: Tue, 28 Jul 1992 18:25:47 GMT
- Lines: 32
-
-
- I am working on a make file. In this makefile, I have a variable called
- OBJS which is set to a series of .o file names. I want to put these
- .o files into a library. I am trying to figure out what I need to put
- into my makefile. Here is what I have now:
-
- OBJS=\
- file1.o \
- file2.o \
- file3.o
-
- libabj.a: libabj.a (${OBJS})
- $(AR) $(ARFLAGS) $@ $?
- $(RANLIB) $@
-
- libabj.a(%.o): %.o
- @true
-
- which is patterned after the make command doc.
-
- What I get is:
- make: Warning: Infinite loop: Target `libabj.a' depends on itself
- make: Fatal error: Don't know how to make target `(file1.o)'
-
-
- Can someone show me my mistake?
-
- --
- Larry W. Virden UUCP: osu-cis!chemabs!lvirden
- Same Mbox: BITNET: lvirden@cas INET: lvirden@cas.org
- Personal: 674 Falls Place, Reynoldsburg, OH 43068-1614
- America Online: lvirden@aol.com
-