home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 20156 < prev    next >
Encoding:
Text File  |  1992-12-13  |  2.7 KB  |  61 lines

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