daleken/
daleken/data/notes/
daleken/data/player/
daleken/data/system/poses/
daleken/doc/Homepage/images/
daleken/log/
# Makefile for Solaris 2.4 for x86
# Changes contributed by Izuskin Kromosoeto and The Maniac

TARGET	= daleken.new
CC      = gcc
PROF    =
DEBUG   = -g
NOCRYPT =
O_FLAGS = -O2
C_FLAGS	= $(O_FLAGS) $(DEBUG) $(PROF) $(NOCRYPT)
LINKLIB	= -lm -lelf -lucb -lsocket -lnsl
L_FLAGS	= $(O_FLAGS) $(LINKLIB)     $(DEBUG) $(PROF)

# These are the files that are needed, if you add any files to the system
# please add the name to this list.

O_FILES = act_comm.o act_info.o act_fight.o act_move.o act_obj.o act_wiz.o \
	bit.o comm.o const.o db.o fight.o handler.o interp.o magic_def.o \
	magic_misc.o magic_off.o mem.o mob_commands.o mud_prog.o note.o \
	olc.o olc_act.o olc_misc.o olc_save.o religion.o save.o special.o \
	ssm.o string.o update.o

C_FILES = act_comm.c, act_info.c act_fight.c act_move.c act_obj.c act_wiz.c \
	bit.c comm.c const.c db.c fight.c handler.c interp.c magic_def.c \
	magic_misc.c magic_off.c mem.c mob_commands.c mud_prog.c note.c \
	olc.c olc_act.c olc_misc.c olc_save.c religion.c save.c special.c \
	ssm.c string.c update.c

all: $(TARGET)
install: $(TARGET)
$(TARGET): $(O_FILES)
	$(CC) $(L_FLAGS) -o $(TARGET) $(O_FILES)
	@chmod ug=rw,o=r $(O_FILES)
	@chmod ug=rwxs,o= $(TARGET)
	@./tagupdate
	@./buildupdate < ../system/SYSINFO.TXT

%.o: %.c
	$(CC) -c $(C_FLAGS) $< -o $@
	@touch .build

$(O_FILES): mud.h
olc.o olc_act.o olc_save.o bit.o mem.o db.o mob_prog.o: olc.h

clean:
	rm -f *.o $(TARGET) *.c~ *.h~
	./tagupdate

optim:
	@echo You have chosen to optimise the code.
	@echo This means you will probably have to wait a little longer.
	@make -k O_FLAGS=-O DEBUG=

# Profile Daleken with gprof (GNU profiler)
profile:
	@echo Ensure you have done a \"make clean\" before and after a profile make.
	@echo Object files made with profile aren\'t compatible with others.
	@make PROF=-pg DEBUG=