Re: [SYSTEM-LINUX] Compiler obj files.

From: Torgny Bjers (
Date: 09/15/02

On 02-09-15 14.36, "Mike Stilson" <mike@VELGARIAN.SYTES.NET> wrote:

> On Sat, Sep 14, 2002 at 11:13:26AM +0200, Torgny Bjers wrote:
>> On 02-09-14 06.36, "Justin Adler" <spam@WORLD-DOMINATION.COM.AU> wrote:
>>> Hello Circlemud guru's.
>>>  Is there any possible way to modify the stock circlemud MAKEFILE, so
>>> all the obj files are NOT created in the ../circle/src directory, but
>>> maybe into ../circle/bin/obj  or somewhere else? and when it makes the
>>> executable, it already ~knows~ where all the .obj files are?
>>>  Thanks in advance to any help.
>> Well, here's what you COULD do:
> Only one problem with this (in 2 places):
> the $(wildcard) grabs ALL the files.  If you have some half-done stuff
> in the directory, or some files you don't want to use in that version,
> it'll happily grab them too.  Fine for a release version of a program
> but IMHO it's not too great for a development version.  Better to just
> have a list of the ones you want in.

I want it to grab all files.  If I don't want the file compiled I move it
out of the directory instead, since if I don't want it compiled, why should
it be in my source directory in the first place?  Then I'd end up having to
edit my .cvsignore constantly, and out of laziness it's just easier to not
have them in the directory if they're not supposed to be there. :)

>> Open up your
>> ..............
>> + # Source files
>> + SRC_FILES := $(wildcard *.c)
>               ^^^^^^^^^^^^^^^
>> + # Include files
>> + INC_FILES := $(wildcard h/*.h)
>               ^^^^^^^^^^^^^^^^^
>> Uhm... :) Have fun.  If anybody found this extremely retarded and
>> cumbersome, please, enlighten us, since I don't know Jack sh*t about
>> Makefile and Jack just left town.  I just winged it.
> Nah, on the right track.
> Personally, I liked having the .h files in their own subdir too.  (90%
> out of laziness.. no need to even type the .h or .c with tab completion
> ;-)

It's harder to edit the files remotely through FTP if you have the headers
in their own dir, since then you can't type "db." in the file dialog and get
both db.c and db.h.  I NEVER edit files through the shell, why sit in Jed or
whatever when I can have EditPlus?

> Anyone who's real interested, let me know and I'll just send ya my whole
> makefile off the list (It's, umm.. big).

Sure, send it over to me. :)


   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT