home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!ncar!noao!amethyst!organpipe.uug.arizona.edu!argus.lpl.Arizona.EDU!ron
- From: ron@argus.lpl.Arizona.EDU (Ron Watkins)
- Newsgroups: comp.os.linux
- Subject: GNU Make(file) question
- Keywords: GNU Make
- Message-ID: <1992Dec12.224013.10416@organpipe.uug.arizona.edu>
- Date: 12 Dec 92 22:40:13 GMT
- Sender: news@organpipe.uug.arizona.edu
- Organization: Lunar and Planetary Lab, U of AZ
- Lines: 49
-
-
- To any MAKE (GNU) experts out there. I have been using the following Makefile
- under SUN/OS 4 for some time now. I have just tried moving some of my libraries
- to Linux using GNU MAKE. I have two problems. First, when I use this exact
- makefile, the only thing that happens is that all the source modules get
- compiled. But nothing gets put into the library. The rules for making .a files
- from .o files seem to not be working as I expect them to.
- The second problem is that if I try to put explicit rules in the form of
- $(CC) $(CFLAGS) $(CPPFLAGS) $@
- and
- $(AR) -rv $(LIB) $@
- then the literal strings for the library name and object module are being
- substituted for just the object module. IE. I get:
- cc -C event.a(apodize.c (first module in list)
- and
- cc -C AFWLread.c) (last module in list)
- for the compile line and, of course, it won't work. I ran make with the -n and
- -p options and I can send the output to anyone who would like to take a look
- but it seems that the rules are being interpreted and files are being looked
- for with the prefix of event.a( for apodize.o and AFWLread.o) for the last.
- The ones in the middle seem to be ok (as far as I can tell from the output of
- the -n option. If anyone has any ideas, please write back at:
- ron@argus.lpl.arizona.edu OR ron@hercules.as.arizona.edu
- Thanks,
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Ron Watkins [ron@argus.lpl.arizona.edu] / _____ /
- 931 Gould-Simpson bldg. / / / /
- University of Arizona / /____/ /
- Tucson, AZ. 85721 / / /
- (602) 621-8606 /_____ unar & / lanetary /_____ ab.
-
- BEGIN "Makefile"-----------------------------------------------------------
- # Makefile for event.a library.
- # written by Ron Watkins 21Dec89.
-
- LIB = event.a
- INC = event.h
- SRC = apodize.c asciiread.c decimate.c deionize.c domain.c dtiread.c \
- guide.c lshift.c mamaread.c mkanalog.c paparead.c remap.c \
- selread.c selwrite.c splotchread.c AFWLread.c
- OBJ = $(SRC:.c=.o)
- CFLAGS = -O
- .PRECIOUS : $(LIB) $(INC) $(SRC)
-
- all : $(LIB)
- ranlib $(LIB)
- $(LIB) : $(LIB)($(OBJ))
- $(LIB)($(OBJ)) : $(INC)
- END "Makefile"------------------------------------------------------------
-