home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!netnews.upenn.edu!farid
- From: farid@gradient.cis.upenn.edu (Hany Farid)
- Newsgroups: comp.lang.c
- Subject: Re: Help with 'make' files.
- Message-ID: <FARID.92Nov23172003@gradient.cis.upenn.edu>
- Date: 23 Nov 92 22:20:03 GMT
- References: <1992Nov23.202839.3607@newsgate.sps.mot.com>
- Sender: news@netnews.upenn.edu
- Organization: /home/farid/.organization
- Lines: 22
- Nntp-Posting-Host: gradient.cis.upenn.edu
- In-reply-to: nahaym@chdasic.sps.mot.com's message of 23 Nov 92 20:28:39 GMT
-
-
- > all: main
- > main: main.o misc.o
- > cc main.o misc.o -o main
- > misc.o : misc.c
- > cc -o misc misc.c
- > main.o : main.c
- > cc -o main main.c
- >
- > I then type 'make', but it never links the main
- > and misc together....
-
- Try this:
- main: main.o misc.o
- cc -o main main.o misc.o
-
- main.o: main.c
- misc.o: misc.c
- You do not need to explicitly give the rules for main.o and misc.o
- since the default make rules know how to handle them.
-
- Hany Farid
-