delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/17/12:35:56

From: "DeHackEd" <not AT given DOT out>
References: <34E746BA DOT 57915167 AT primenet DOT com>
Subject: Re: Makefile
Date: Mon, 16 Feb 1998 16:29:50 -0500
Lines: 34
Message-ID: <#0aF2HyO9GA.198@upnetnews02.moswest.msn.net>
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

You got it backwards!

somefile.cc: somefile.o

This is backwards! The source file is not dependant on the object, it's the
other way around. Also, "luth" is dependant on the .o files, not the .cc files.
This causes make to see you have all your .cc files up to date, and doesn't see
a need to compile the .o files. And for the sake of it (I do it, but you may
not), put .exe on the end of your "luth" references. This will make sure you get
a .EXE file, and makes non-gcc users know what the output is to be.


Revised makefile template

luth.exe: chatacte.o file.o graphics.o messeng.o etc.
    gxx -o luth.exe <.o files> -lalleg

# gxx when making .o files is unnecessary and a waste
characte.o: characte.cc
    gcc -c characte.cc

file.o: file.cc
    gcc -c file.cc

--
"DeHackEd"

EMail address not given out due to low-life spammers.
Mike McLean wrote in message <34E746BA DOT 57915167 AT primenet DOT com>...
>I saw the posting about makefiles in the allegro list earlier today, and
>decided to try and write my own for my game.  I have run into troubles
>though.  Here is my makefile.


- Raw text -


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