#Makefile for Legend engine by Todd Allen (Barghest), toddmallen@gmail.com.
##################################################################################
#Legend is free software licensed under the GNU General Public License (GPL), #
#available in the attached license.txt and/or COPYING file in the docs directory.#
#This program is provided with NO WARRANTY of any kind and is run at the user's #
#own risk. #
##################################################################################
CC=g++
C_FLAGS=-c -Wall -g3
O_FLAGS =-o
C_FILES=socket.cpp update.cpp utils.cpp
H_FILES=socket.h
O_FILES=socket.o update.o utils.o
#Comment the following line if you do not wish to encrypt passwords. It is
#recommended that you do use encrypted passwords unless the use of encryption
#is illegal in your country. If you do remove encryption remember to add the line
# "#undef USECRYPT" to the legend.h file.
#Comment out the following line (and #undef BSD in legend.h) if you are compiling
#under BSD.
CRYPT = -lcrypt
all: legend
legend: $(O_FILES)
@echo " Linking files"
@rm -f legend
@$(CC) $(O_FILES) $(CRYPT) $(O_FLAGS) legend
socket.o: socket.cpp socket.h legend.h
@echo " Compiling socket.o"
@$(CC) $(C_FLAGS) socket.cpp
update.o: update.cpp legend.h
@echo " Compiling update.o"
@$(CC) $(C_FLAGS) update.cpp
utils.o: utils.cpp legend.h
@echo " Compiling utils.o"
@$(CC) $(C_FLAGS) utils.cpp
error.o: utils.cpp legend.h
@echo " Compiling error.o"
@$(CC) $(C_FLAGS) utils.cpp
#Used to clean up object files and the executable. You will need to recompile all
#object files at the next compilation if this option is used. Recommended to save space
#if you do not frequently alter code or start and stop the MUD. If this option is used you
#must recompile if you wish to restart.
clean:
@echo "Cleaning..."
@rm -f legend
@rm -f *.o
@echo "Done."
#Clean ONLY object files. Recommended if you have frequent need to restart the MUD but not to
#alter the code, this will leave the executable in place for any necessary restart.
cleanobj:
@echo "Cleaning object files..."
@rm -f *.o
@echo "Done."