Well i can only speak from my experience, i did somthing like this a few years ago, but mine includes little more, but this project is droped now i will include the makefile and my makefile_output.sh
Yes i know it could be doon bettere, and alot cleanere, but i was just toying with the makefiles and make. BEGIN MAKEFILE: ---------------------- ##################### # Makefile for TLL. # ##################### CC = gcc PROF = -g OPTIMIZE = -O NOCRYPT = CC_FLAGS = -Wall $(OPTIMIZE) $(PROF) $(NOCRYPT) LIB_FLAGS = -lcrypt $(OPTIMIZE) $(PROF) ########################################################################### # for bsd use: # CC_FLAGS = -Wall $(OPTIMIZE) $(PROF) $(NOCRYPT) -DOLD_RAND -DNOCRYPT ########################################################################### # for solaris use: # LIBS_FLAGS = -lsocket -lresolv -lnsl ########################################################################### O_FILES = rom.o \ commands/do_deaf.o \ commands/do_quiet.o \ commands/do_gossip.o \ commands/do_grats.o \ commands/do_quote.o \ commands/do_tell.o \ commands/do_replay.o \ commands/do_reply.o \ commands/do_question.o \ commands/do_answer.o \ commands/do_music.o \ commands/do_clantalk.o \ commands/do_immtalk.o \ commands/do_gocial.o \ commands/do_say.o \ commands/do_shout.o \ commands/do_yell.o \ commands/do_emote.o \ commands/do_pmote.o \ commands/do_gtell.o \ commands/do_wedtalk.o \ commands/do_delete.o \ commands/do_social.o \ commands/do_pipe.o \ ban.o \ alias.o \ comm.o \ const.o \ db.o \ db2.o \ log.o \ effects.o \ fight.o \ flags.o \ handler.o \ healer.o \ interp.o \ board.o \ lookup.o \ magic.o \ magic2.o \ music.o \ recycle.o \ save.o \ scan.o \ skills.o \ special.o \ tables.o \ update.o \ mob_cmds.o \ mob_prog.o \ olc.o \ olc_act.o \ olc_save.o \ building/olc_alist.o \ building/olc_hedit.o \ building/olc_medit.o \ bit.o \ mem.o \ string.o \ olc_mpcode.o \ www.o \ freeze.o \ remort.o \ wizlist.o \ wizutil.o \ class.o default: copyright @echo "Usage: 'make redhat' for RedHat 5.0 > 6.2" @echo "Usage: 'make mandrake' for ManDrake 7.1 > X.x" copyright: @clear @echo -e "\\033[1;34m --------------------------------------------------------------- ---------------\\033[0;39m" @echo -e "\\033[1;34m| \\033[1;31mTHE LOST LAND Version 1.0.0. \\033[1;34m|\\033[0;39m" @echo -e "\\033[1;34m --------------------------------------------------------------- ---------------\\033[0;39m" redhat: start tll mandrake: start tll start: copyright [EMAIL PROTECTED] -f error.log .temp.log .temp.warning tll: $(O_FILES) @echo -e "\\033[1;34m --------------------------------------------------------------- ---------------\\033[0;39m" [EMAIL PROTECTED] < error.log @echo -e "\\033[1;34m --------------------------------------------------------------- ---------------\\033[0;39m" @echo -en "\\033[0;39mRemoving old linked file. \\033[1;37m(\\033[1;35mTLL\\033[1;37m)\\033[0;39m" @echo -en \\033[300C\\033[13D @echo -en "\\033[0;39m[ \\033[1;37m DELETING \\033[0;39m]" @rm -f tll @echo -e "\\033[13D\\033[0;39m[ \\033[1;32m D O N E \\033[0;39m ]" @echo "Linking TLL." @$(CC) $(LIB_FLAGS) -o tll $(O_FILES) @echo "Striping TLL." @strip tll @echo -e "\\033[1;34m --------------------------------------------------------------- ---------------\\033[0;39m" .c.o: include.h @echo -en "\\033[1;41m$*.c\\033[0;39m as \\033[1;41m$*.o\\033[0;39m" @echo -en \\033[300C\\033[13D @echo -en "\\033[0;39m[ \\033[1;37m\\033[5;37mCOMPILING\\033[0;39m ]" @$(CC) $(CC_FLAGS) -c $*.c -o $*.o >>.temp.log 2>&1 @cat .temp.log >> error.log @./Makefile_output.sh clean: @echo "Deleting tempory files:" rm -f *.o core error.log .temp.log .temp.warning tll rm -f ../area/core rm -f building/*.o rm -f commands/*.o rm -f skills/*.o rm -f spells/*.o rm -f system/*.o @echo "Done" dist-clean: clean rm -f tll ../bin/tll ../data/logs/* ../area/help.bak install: @echo "Moveing Executeable file to ../bin/" @cp -f tll ../bin/ backup: dist-clean @../bin/backup $2 error: [EMAIL PROTECTED] < error.log [EMAIL PROTECTED] < .temp.log BEGIN MAKEFILE_output.sh: ----------------------------------------- #!/bin/sh if [ -s .temp.log ]; then grep -n "warning" .temp.log >> .temp.warning if [ -s .temp.warning ]; then buf="\\033[13D\\033[0;39m[\\033[1;33mP A S S E D\\033[0;39m]" fi else buf="\\033[13D\\033[0;39m[ \\033[1;32m D O N E \\033[0;39m ]" fi echo -e $buf rm -f .temp.warning rm -f .temp.log

