delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/18/00:15:50

From: "DeHackEd" <dehacked72 AT nospam DOT hotmail DOT com>
References: <674pcp$dc2 AT bgtnsc01 DOT worldnet DOT att DOT net>
Subject: Re: What is Make??
Date: Tue, 16 Dec 1997 17:30:04 -0500
Lines: 30
Message-ID: <##NidGnC9GA.169@upnetnews02.moswest.msn.net>
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Kent wrote in message <674pcp$dc2 AT bgtnsc01 DOT worldnet DOT att DOT net>...
>Hey, I was just wondering what Make and Makefiles are.  Thanks, cYA
>--
>    _     ___
>|/ |_ |\ | |
>|\ |_ | \| |  e-mail: cybyrpunk AT postoffice DOT worldnet DOT att DOT net
>      webpage: http://www.angelfire.com/oh/cybyrpunk

Make and makefiles are for large projects. For example:

You have 3 files, combining them makes foo.exe:
foo.c, gfx.c, sound.c

When you make a makefile properly, make will compile:
gcc -c foo.c
gcc -c gfx.c
gcc -c sound.c
gcc -o foo.exe foo.o gfx.o sound.o

Let's say you change sound.c to incorperate a new sound card (who knows). Then
you save it and re-run make.

gcc -c sound.c
gcc -o foo.exe foo.o gfx.o sound.o

It does all sorts of neat things. Check out the DJGPP documentation for details,
or a general programming book for an overall view of makefiles.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019