Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUDs ➜ General ➜ TinyMUD Makefile and Subdirectories

TinyMUD Makefile and Subdirectories

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by The Illustrious Skwerl   (3 posts)  Bio
Date Tue 23 Oct 2007 07:15 PM (UTC)
Message
I ended up getting a decent computer free from my school on which to run Ubuntu and TinyMUD.

I'm trying to clean up the TinyMUD install directory, so I added a new directory o/ for .o and .d files. The Makefile modifications are being quite retentive, and I don't know why. >_<

make: *** No rule to make target `o/tinymudserver.o', needed by `grun'. Stop.



CC=g++
CCFLAGS=-g3 -Wall -w -pedantic -fmessage-length=0

O_FILES = o/tinymudserver.o o/strings.o o/player.o o/load.o o/commands.o o/states.o o/globals.o o/comms.o o/room.o

tonymudserver : $(O_FILES)
$(CC) $(CCFLAGS) -o grun $(O_FILES)

# dependency stuff, see:
http://www.cs.berkeley.edu/~smcpeak/autodepend/autodepend.html
# pull in dependency info for *existing* .o files
-include $(O_FILES:.o=.d)

.SUFFIXES : .o .cpp

.cpp.o :
$(CC) $(CCFLAGS) -c $<
$(CC) -MM $(CFLAGS) $*.cpp > o/$*.d

clean:
rm -f grun o/*.o o/*.d
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Tue 23 Oct 2007 07:33 PM (UTC)
Message
I'd suggest grabbing the SmaugFUSS makefile and emulate what they do. This kind of stuff is tricky and easy to mess up, even if you're fairly comfortable with makefiles. They do the kind of dependency and object file sorting that you want.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by The Illustrious Skwerl   (3 posts)  Bio
Date Reply #2 on Wed 24 Oct 2007 07:48 PM (UTC)
Message
the dependency stuff is of no import, really. I just want to be able to make with the object files popping into that directory. =/
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Thu 25 Oct 2007 12:52 AM (UTC)
Message
Even so, the FUSS makefile does that too, which is why I suggested that you look into it. You can probably almost copy-paste it, just adjusting the list of input files.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,476 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.