home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 17069 < prev    next >
Encoding:
Internet Message Format  |  1992-11-24  |  995 b 

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!netnews.upenn.edu!farid
  2. From: farid@gradient.cis.upenn.edu (Hany Farid)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help with 'make' files.
  5. Message-ID: <FARID.92Nov23172003@gradient.cis.upenn.edu>
  6. Date: 23 Nov 92 22:20:03 GMT
  7. References: <1992Nov23.202839.3607@newsgate.sps.mot.com>
  8. Sender: news@netnews.upenn.edu
  9. Organization: /home/farid/.organization
  10. Lines: 22
  11. Nntp-Posting-Host: gradient.cis.upenn.edu
  12. In-reply-to: nahaym@chdasic.sps.mot.com's message of 23 Nov 92 20:28:39 GMT
  13.  
  14.  
  15. >   all: main
  16. >   main:    main.o misc.o
  17. >       cc main.o misc.o -o main
  18. >   misc.o : misc.c
  19. >       cc -o misc misc.c
  20. >   main.o : main.c
  21. >       cc -o main main.c 
  22. >
  23. >   I then type 'make', but it never links the main
  24. >   and misc together....
  25.  
  26. Try this:
  27.     main: main.o misc.o
  28.         cc -o main main.o misc.o
  29.  
  30.     main.o: main.c
  31.     misc.o: misc.c
  32. You do not need to explicitly give the rules for main.o and misc.o
  33. since the default make rules know how to handle them.
  34.  
  35. Hany Farid
  36.