CC = g++
PROF = -ggdb3
WARN = -Wall -Werror
LIBS = -lcrypt -lz
#STRHASH: 0 = no string hashing.
1 = ROM fread_string() hashing only.
2 = full string hashing
D_FLAGS = -DSTRHASH=0 #-DNO_MCCP -DNO_WEB -DNOCRYPT
C_FLAGS = $(WARN) $(PROF) $(D_FLAGS)
L_FLAGS = $(PROF) $(LIBS)
C_FILES := $(wildcard *.c)
O_FILES := $(patsubst %.c, %.o, $(C_FILES))
H_FILES := $(wildcard *.h)
all: rom
rom: $(O_FILES)
@rm -f rom
@$(CC) $(L_FLAGS) -o rom $(O_FILES)
@echo "Done."
.c.o: merc.h
@echo "`date +"%X"` : Compiling $<..."
@$(CC) -c $(C_FLAGS) $<
clean:
@rm -rf *.o *~ *.orig *.rej \#* *core*
@echo "Done cleaning."
indent:
@indent $(C_FILES) $(H_FILES)
@echo "Done formating files."
depend:
@$(CC) -E -MM $(C_FLAGS) $(C_FILES) -I. > .depend
@echo "Done making depend file."
# DO NOT DELETE THIS LINE -- make depend depends on it.
include .depend