(BTW - instead of asking if ther is an interest and generating as much
traffic as this one post will take, I figured just send it =) so
please, don't complain)
Well, on other projects I got used to having my object files stored
elsewhere. I like this alot, so I changed the circle Makefile to this
format, and now I'm sharing it with you. =)
OBJDIR = <string>
where string == a directory with trailing backslash (../obj/)
this will put all the .o files in ../obj the reason I set it up so that
you needed a trailing backslash is so that you can have multiple .o versions.
You can choose to store them in seperate directories (../obj/a/,
../obj/b/) or using your own number system to mark the .o files.
(../obj/a, ../obj/b) the second method prepends the a or b or whatever
onto the object file, and stores them all in ../obj
Here it is =) --------------------- (Jeremy, feel free to butcher and use)
# CircleMUD 3.0 Makefile
#
# This makefile should work with no changes for compiling under SunOS, Ultrix,
# NeXTSTEP, HP/UX, DG/UX, and Linux. If you're using AIX, IRIX, some version
# of SVR4 or Solaris, uncomment the appropriate lines below. If you're using
# some other operating system not mentioned, just type 'make' and cross your
# fingers..
#compiler name and flags
CC = gcc
MYFLAGS = -g -Wall
#flags for profiling (see hacker.doc for more information)
PROFILE =
#remove the hash marks below if compiling under AIX
#CC = cc
#MYFLAGS = -g
#remove the hash marks below if compiling under IRIX
#CC = cc -cckr -fullwarn
#MYFLAGS = -g
#LIBS = -lmalloc
#remove the hash mark below if compiling under SVR4 or Solaris, or if your
#linker complains that the socket functions such as 'connect()', 'bind()',
#etc are undefined when you try to compile the server.
#LIBS = -lsocket -lnsl
##############################################################################
# Do Not Modify Anything Below This Line (unless you know what you're doing) #
##############################################################################
OBJDIR = ../obj/
CFLAGS = $(MYFLAGS) $(PROFILE)
OBJFILES = $(OBJDIR)act.informative.o $(OBJDIR)act.offensive.o \
$(OBJDIR)act.movement.o $(OBJDIR)spell_parser.o \
$(OBJDIR)interpreter.o $(OBJDIR)spec_assign.o \
$(OBJDIR)act.social.o $(OBJDIR)act.wizard.o \
$(OBJDIR)spec_procs.o $(OBJDIR)act.other.o \
$(OBJDIR)constants.o $(OBJDIR)act.comm.o \
$(OBJDIR)act.obj.o $(OBJDIR)handler.o \
$(OBJDIR)objsave.o $(OBJDIR)weather.o \
$(OBJDIR)boards.o $(OBJDIR)castle.o $(OBJDIR)config.o \
$(OBJDIR)limits.o $(OBJDIR)mobact.o $(OBJDIR)modify.o \
$(OBJDIR)random.o $(OBJDIR)spells.o $(OBJDIR)alias.o \
$(OBJDIR)class.o $(OBJDIR)fight.o $(OBJDIR)graph.o \
$(OBJDIR)house.o $(OBJDIR)magic.o $(OBJDIR)utils.o \
$(OBJDIR)comm.o $(OBJDIR)mail.o $(OBJDIR)race.o \
$(OBJDIR)shop.o $(OBJDIR)ban.o $(OBJDIR)olc.o \
$(OBJDIR)db.o
default: .accepted
$(MAKE) ../bin/circle
.accepted:
@./licheck
utils: .accepted
$(MAKE) ../bin/autowiz
$(MAKE) ../bin/delobjs
$(MAKE) ../bin/listrent
$(MAKE) ../bin/mudpasswd
$(MAKE) ../bin/purgeplay
$(MAKE) ../bin/showplay
$(MAKE) ../bin/sign
$(MAKE) ../bin/split
all: .accepted
$(MAKE) ../bin/circle
$(MAKE) utils
circle:
$(MAKE) ../bin/circle
autowiz:
$(MAKE) ../bin/autowiz
delobjs:
$(MAKE) ../bin/delobjs
listrent:
$(MAKE) ../bin/listrent
mudpasswd:
$(MAKE) ../bin/mudpasswd
purgeplay:
$(MAKE) ../bin/purgeplay
showplay:
$(MAKE) ../bin/showplay
sign:
$(MAKE) ../bin/sign
split:
$(MAKE) ../bin/split
../bin/autowiz : util/autowiz.c structs.h db.h utils.h
$(CC) $(CFLAGS) -o ../bin/autowiz util/autowiz.c
../bin/delobjs : util/delobjs.c structs.h
$(CC) $(CFLAGS) -o ../bin/delobjs util/delobjs.c
../bin/listrent : util/listrent.c structs.h
$(CC) $(CFLAGS) -o ../bin/listrent util/listrent.c
../bin/mudpasswd : util/mudpasswd.c structs.h
$(CC) $(CFLAGS) -o ../bin/mudpasswd util/mudpasswd.c
../bin/purgeplay : util/purgeplay.c structs.h
$(CC) $(CFLAGS) -o ../bin/purgeplay util/purgeplay.c
../bin/showplay : util/showplay.c structs.h
$(CC) $(CFLAGS) -o ../bin/showplay util/showplay.c
../bin/sign: util/sign.c
$(CC) $(CFLAGS) -o ../bin/sign $(COMMFLAGS) util/sign.c
../bin/split: util/split.c
$(CC) $(CFLAGS) -o ../bin/split util/split.c
clean:
rm -f *.o
# Dependencies for the main mud
$(OBJDIR)comm.o : comm.c structs.h utils.h comm.h interpreter.h handler.h db.h \
house.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)comm.o comm.c
$(OBJDIR)act.comm.o : act.comm.c structs.h utils.h comm.h interpreter.h \
handler.h db.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)act.comm.o act.comm.c
$(OBJDIR)act.informative.o : act.informative.c structs.h utils.h comm.h \
interpreter.h handler.h db.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)act.informative.o act.informative.c
$(OBJDIR)act.movement.o : act.movement.c structs.h utils.h comm.h interpreter.h\
handler.h db.h spells.h house.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)act.movement.o act.movement.c
$(OBJDIR)act.obj.o : act.obj.c structs.h utils.h comm.h interpreter.h handler.h\
db.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)act.obj.o act.obj.c
$(OBJDIR)act.offensive.o : act.offensive.c structs.h utils.h comm.h \
interpreter.h handler.h db.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)act.offensive.o act.offensive.c
$(OBJDIR)act.other.o : act.other.c structs.h utils.h comm.h interpreter.h \
handler.h db.h spells.h house.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)act.other.o act.other.c
$(OBJDIR)act.social.o : act.social.c structs.h utils.h comm.h interpreter.h \
handler.h db.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)act.social.o act.social.c
$(OBJDIR)act.wizard.o : act.wizard.c structs.h utils.h comm.h interpreter.h \
handler.h db.h spells.h house.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)act.wizard.o act.wizard.c
$(OBJDIR)alias.o : alias.c structs.h utils.h interpreter.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)alias.o alias.c
$(OBJDIR)ban.o : ban.c structs.h utils.h comm.h interpreter.h handler.h db.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)ban.o ban.c
$(OBJDIR)boards.o : boards.c structs.h utils.h comm.h db.h boards.h \
interpreter.h handler.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)boards.o boards.c
$(OBJDIR)castle.o : castle.c structs.h utils.h comm.h interpreter.h handler.h \
db.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)castle.o castle.c
$(OBJDIR)class.o : class.c structs.h utils.h spells.h interpreter.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)class.o class.c
$(OBJDIR)race.o : race.c structs.h utils.h interpreter.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)race.o race.c
$(OBJDIR)config.o : config.c structs.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)config.o config.c
$(OBJDIR)constants.o : constants.c structs.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)constants.o constants.c
$(OBJDIR)db.o : db.c structs.h utils.h db.h comm.h handler.h spells.h \
mail.h interpreter.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)db.o db.c
$(OBJDIR)fight.o : fight.c structs.h utils.h comm.h handler.h interpreter.h \
db.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)fight.o fight.c
$(OBJDIR)graph.o : graph.c structs.h utils.h comm.h interpreter.h handler.h \
db.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)graph.o graph.c
$(OBJDIR)handler.o : handler.c structs.h utils.h comm.h db.h handler.h \
interpreter.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)handler.o handler.c
$(OBJDIR)house.o : house.c structs.h comm.h handler.h db.h interpreter.h utils.h house.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)house.o house.c
$(OBJDIR)interpreter.o : interpreter.c structs.h comm.h interpreter.h db.h \
utils.h spells.h handler.h mail.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)interpreter.o interpreter.c
$(OBJDIR)limits.o : limits.c structs.h utils.h spells.h comm.h db.h handler.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)limits.o limits.c
$(OBJDIR)magic.o : magic.c structs.h utils.h comm.h spells.h handler.h \
interpreter.h db.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)magic.o magic.c
$(OBJDIR)mail.o : mail.c mail.h structs.h utils.h comm.h db.h interpreter.h \
handler.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)mail.o mail.c
$(OBJDIR)mobact.o : mobact.c utils.h structs.h db.h comm.h interpreter.h \
handler.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)mobact.o mobact.c
$(OBJDIR)modify.o : modify.c structs.h utils.h interpreter.h handler.h db.h \
comm.h spells.h mail.h boards.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)modify.o modify.c
$(OBJDIR)objsave.o : objsave.c structs.h comm.h handler.h db.h interpreter.h \
utils.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)objsave.o objsave.c
$(OBJDIR)olc.o : olc.c structs.h utils.h comm.h interpreter.h handler.h db.h \
olc.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)olc.o olc.c
$(OBJDIR)random.o : random.c
$(CC) -c $(CFLAGS) -o $(OBJDIR)random.o random.c
$(OBJDIR)shop.o : shop.c structs.h comm.h handler.h db.h interpreter.h utils.h \
shop.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)shop.o shop.c
$(OBJDIR)spec_assign.o : spec_assign.c structs.h db.h interpreter.h utils.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)spec_assign.o spec_assign.c
$(OBJDIR)spec_procs.o : spec_procs.c structs.h utils.h comm.h interpreter.h \
handler.h db.h spells.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)spec_procs.o spec_procs.c
$(OBJDIR)spell_parser.o : spell_parser.c structs.h utils.h comm.h db.h \
interpreter.h spells.h handler.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)spell_parser.o spell_parser.c
$(OBJDIR)spells.o : spells.c structs.h utils.h comm.h db.h interpreter.h \
spells.h handler.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)spells.o spells.c
$(OBJDIR)utils.o : utils.c structs.h utils.h comm.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)utils.o utils.c
$(OBJDIR)weather.o : weather.c structs.h utils.h comm.h handler.h interpreter.h\
db.h
$(CC) -c $(CFLAGS) -o $(OBJDIR)weather.o weather.c
../bin/circle : $(OBJFILES)
$(CC) -o ../bin/circle $(PROFILE) $(OBJFILES) $(LIBS)
This archive was generated by hypermail 2b30 : 12/07/00 PST