how would I add another .c file?

Posted by Kanzeil on Sun 23 May 2004 03:28 AM — 2 posts, 11,359 views.

#0
I've got this snippet clan.c and I want to integrate it into the make im not sure how to do this I tried to add a few lines to my merc.h but that didnt do anything (I feel kinda retarded asking questions that are probably easy to answer, but im new to this and all)
Australia Forum Administrator #1
In your Makefile (a file of that name) you will find some lines like this:


O_FILES = act_comm.o act_enter.o act_info.o act_move.o act_obj.o act_wiz.o \
          alias.o ban.o comm.o const.o db.o db2.o effects.o fight.o flags.o \
          handler.o healer.o interp.o note.o lookup.o magic.o magic2.o \
          music.o recycle.o save.o scan.o skills.o special.o tables.o \
          update.o


Simply add the new file (with the .o extension), thus forcing the .c file to be compiled to produce the required .o file. eg.



O_FILES = act_comm.o act_enter.o act_info.o act_move.o act_obj.o act_wiz.o \
          alias.o ban.o comm.o const.o db.o db2.o effects.o fight.o flags.o \
          handler.o healer.o interp.o note.o lookup.o magic.o magic2.o \
          music.o recycle.o save.o scan.o skills.o special.o tables.o \
          update.o clan.o