> How do I put the races.c into the Makefile for that comes with > CircleMUDOasisOLC preinstalled? I could do the first part, but since there > is no random.o or random.c, im just lost. Could you please put it in the esy > format like below, but anything will be appreciated. The 'make' file format - at least for circle's format - is pretty simplistic. We shall use act.other.c as an example. act.other.c will eventually be compiled as act.other.o (ie, we'll want to be able to type 'make act.other.o' and have it be made. Our entry inthe make file may look like this; act.other.o: act.other.c conf.h sysdep.h structs.h utils.h comm.h \ interpreter.h handler.h db.h spells.h screen.h house.h constants.h <tab> $(CC) -c $(CFLAGS) act.other.c This is generalized in this way: <thing to make>: <list of files to 'look' at> <command to run> The list of files is really the only thing that needs expliation. These are files which 'make' looks at to determine if it needs to run the command. If 'thing to make' has a modification time sooner than any of the files that are listed, run the command, else, don't run it. This is the main use of the Makefile and the make program. If no depended upon files have been changed, you don't need to recompile the whole program. The last step is to add these files to your end-compile... that is, the linker stage where all your object (.o) files are ...well...linked together. In the circlemud makefile, that's done simply by putting your <thing to make> in the OBJS variable, which is defined uptop. You can simply add that to the end. The only problem; just make sure to use the c-preprocessor type macro definition rules for variables.... that is, use the \ if you have multiple lines. PjD +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT