# I just thought it was time to write a new makefile (= -Chris CXX = g++ CC = gcc LIBS = -lcrypt PROFILE = # I added the DEBUG flag to make extensive checks on lists and such # in order to find any problems such as not freeing up pointers properly. # The obvious drawback is that it's time consuming, so once things go # smooth, the define can be removed. # MYFLAGS = -ggdb3 -Wall -Wno-unused -DDEBUG -Dlinux -O MYFLAGS = -ggdb -Wall -Wno-unused -DDEBUG -Dlinux -O CPPFLAGS = $(MYFLAGS) $(PROFILE) sourcefiles = $(wildcard *.cc) objfiles = $(sourcefiles:.cc=.o) incfiles = $(addprefix ., $(sourcefiles:.cc=.d)) ../bin/server.new : $(objfiles) utils: $(MAKE) ../bin/autowiz $(MAKE) ../bin/delobjs $(MAKE) ../bin/listrent $(MAKE) ../bin/mudpasswd $(MAKE) ../bin/purgeplay $(MAKE) ../bin/showplay $(MAKE) ../bin/sign $(MAKE) ../bin/split 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.cc structs.h db.h utils.h $(CXX) $(CPPFLAGS) -o ../bin/autowiz util/autowiz.cc ../bin/delobjs : util/delobjs.cc structs.h $(CXX) $(CPPFLAGS) -o ../bin/delobjs util/delobjs.cc ../bin/listrent : util/listrent.cc structs.h $(CXX) $(CPPFLAGS) -o ../bin/listrent util/listrent.cc ../bin/mudpasswd : util/mudpasswd.cc structs.h $(CXX) $(CPPFLAGS) -o ../bin/mudpasswd util/mudpasswd.cc ../bin/purgeplay : util/purgeplay.cc structs.h $(CXX) $(CPPFLAGS) -o ../bin/purgeplay util/purgeplay.cc ../bin/showplay : util/showplay.cc structs.h $(CXX) $(CPPFLAGS) -o ../bin/showplay util/showplay.cc ../bin/sign: util/sign.cc $(CXX) $(CPPFLAGS) -o ../bin/sign $(COMMFLAGS) util/sign.cc ../bin/split: util/split.cc $(CXX) $(CPPFLAGS) -o ../bin/split util/split.cc clean: rm -f *.o .*.d ../bin/server.new .%.d: %.cc $(SHELL) -ec '$(CC) -MM $(CPPFLAGS) $< \ | sed '\''s/$*.o/& $@/g'\'' > $@' include $(incfiles) ../bin/server.new : $(CXX) -melf_i386 -o ../bin/server.new $(PROFILE) $(objfiles) $(LIBS)