#
# Modification History
#
# 2003-July-27   Jason Rohrer
# Created.  Modified from konspire2b source.
# Added p2p parts.
#
# 2003-August-7    Jason Rohrer
# Added DuplicateMessageDetector.
#
# 2003-August-12    Jason Rohrer
# Added protocolUtils.
#
# 2003-August-22    Jason Rohrer
# Added encoding utils.
#
# 2003-September-4    Jason Rohrer
# Added mime typer.
#
# 2003-September-5    Jason Rohrer
# Added web server.
#
# 2003-September-8    Jason Rohrer
# Added use of sed to fix auto-generated dependency path.
#
# 2003-October-9    Jason Rohrer
# Added message limiter.
#
# 2004-January-4   Jason Rohrer
# Added network function locks.
#
# 2004-April-1   Jason Rohrer
# Added FinishedSignalThreads.
#
# 2004-May-10   Jason Rohrer
# Added AIFF format.
#
# 2004-June-10   Jason Rohrer
# Added ScreenGL.
#



##
# The common portion of Makefiles for all targets that use minorGems,
# supplying target dependencies for minorGems targets.
#
# Should not be made manually---used by configure to build Makefiles.
##



##
# Dependencies.
##

MINOR_GEMS_SOURCE = \
 ${HOST_ADDRESS_CPP} \
 ${SOCKET_CPP} \
 ${SOCKET_SERVER_CPP} \
 ${SOCKET_CLIENT_CPP} \
 ${NETWORK_FUNCTION_LOCKS_CPP} \
 ${PATH_CPP} \
 ${DIRECTORY_CPP} \
 ${TYPE_IO_CPP} \
 ${TIME_CPP} \
 ${THREAD_CPP} \
 ${MUTEX_LOCK_CPP} \
 ${BINARY_SEMAPHORE_CPP} \
 ${APP_LOG_CPP} \
 ${PRINT_LOG_CPP} \
 ${FILE_LOG_CPP} \
 ${LOG_CPP} \
 ${PRINT_UTILS_CPP} \
 ${WEB_CLIENT_CPP} \
 ${URL_UTILS_CPP} \
 ${MIME_TYPER_CPP} \
 ${STRING_BUFFER_OUTPUT_STREAM_CPP} \
 ${XML_UTILS_CPP} \
 ${HTML_UTILS_CPP} \
 ${SETTINGS_MANAGER_CPP} \
 ${STRING_UTILS_CPP} \
 ${SHA1_CPP} \
 ${AIFF_CPP} \
 ${MEMORY_TRACK_CPP} \
 ${DEBUG_MEMORY_CPP} \
 ${HOST_CATCHER_CPP} \
 ${OUTBOUND_CHANNEL_CPP} \
 ${DUPLICATE_MESSAGE_DETECTOR_CPP} \
 ${PROTOCOL_UTILS_CPP} \
 ${MESSAGE_PER_SECOND_LIMITER_CPP} \
 ${ENCODING_UTILS_CPP} \
 ${WEB_SERVER_CPP} \
 ${REQUEST_HANDLING_THREAD_CPP} \
 ${THREAD_HANDLING_THREAD_CPP} \
 ${CONNECTION_PERMISSION_HANDLER_CPP} \
 ${STOP_SIGNAL_THREAD_CPP} \
 ${FINISHED_SIGNAL_THREAD_CPP} \
 ${SCREEN_GL_CPP}


# sed command for fixing up the dependencies generated by g++
# g++ (pre-3.0) leaves the path off of the .o target
# look for a .o file at the beginning of a line (in other words, one
# without a path), and replace it with the full-path version.
# This should be compatible with g++ 3.0, since we only replace .o names
# that occur at the beginning of a line (using the "^" modifier)

MINOR_GEMS_SED_FIX_COMMAND = sed ' \
s/^HostAddress.*\.o/$${HOST_ADDRESS_O}/; \
s/^Socket.*\.o/$${SOCKET_O}/; \
s/^SocketServer.*\.o/$${SOCKET_SERVER_O}/; \
s/^SocketClient.*\.o/$${SOCKET_CLIENT_O}/; \
s/^NetworkFunctionLocks.*\.o/$${NETWORK_FUNCTION_LOCKS_O}/; \
s/^Path.*\.o/$${PATH_O}/; \
s/^Directory.*\.o/$${DIRECTORY_O}/; \
s/^TypeIO.*\.o/$${TYPE_IO_O}/; \
s/^Time.*\.o/$${TIME_O}/; \
s/^Thread.*\.o/$${THREAD_O}/; \
s/^MutexLock.*\.o/$${MUTEX_LOCK_O}/; \
s/^BinarySemaphore.*\.o/$${BINARY_SEMAPHORE_O}/; \
s/^AppLog.*\.o/$${APP_LOG_O}/; \
s/^PrintLog.*\.o/$${PRINT_LOG_O}/; \
s/^FileLog.*\.o/$${FILE_LOG_O}/; \
s/^Log.*\.o/$${LOG_O}/; \
s/^PrintUtils.*\.o/$${PRINT_UTILS_O}/; \
s/^WebClient.*\.o/$${WEB_CLIENT_O}/; \
s/^URLUtils.*\.o/$${URL_UTILS_O}/; \
s/^MimeTyper.*\.o/$${MIME_TYPER_O}/; \
s/^StringBufferOutputStream.*\.o/$${STRING_BUFFER_OUTPUT_STREAM_O}/; \
s/^XMLUtils.*\.o/$${XML_UTILS_O}/; \
s/^HTMLUtils.*\.o/$${HTML_UTILS_O}/; \
s/^SettingsManager.*\.o/$${SETTINGS_MANAGER_O}/; \
s/^stringUtils.*\.o/$${STRING_UTILS_O}/; \
s/^sha1.*\.o/$${SHA1_O}/; \
s/^aiff.*\.o/$${AIFF_O}/; \
s/^MemoryTrack.*\.o/$${MEMORY_TRACK_O}/; \
s/^DebugMemory.*\.o/$${DEBUG_MEMORY_O}/; \
s/^HostCatcher.*\.o/$${HOST_CATCHER_O}/; \
s/^OutboundChannel.*\.o/$${OUTBOUND_CHANNEL_O}/; \
s/^DuplicateMessageDetector.*\.o/$${DUPLICATE_MESSAGE_DETECTOR_O}/; \
s/^protocolUtils.*\.o/$${PROTOCOL_UTILS_O}/; \
s/^MessagePerSecondLimiter.*\.o/$${MESSAGE_PER_SECOND_LIMITER_O}/; \
s/^encodingUtils.*\.o/$${ENCODING_UTILS_O}/; \
s/^WebServer.*\.o/$${WEB_SERVER_O }/; \
s/^RequestHandlingThread.*\.o/$${REQUEST_HANDLING_THREAD_O}/; \
s/^ThreadHandlingThread.*\.o/$${THREAD_HANDLING_THREAD_O}/; \
s/^ConnectionPermissionHandler.*\.o/$${CONNECTION_PERMISSION_HANDLER_O}/; \
s/^StopSignalThread.*\.o/$${STOP_SIGNAL_THREAD_O}/; \
s/^FinishedSignalThread.*\.o/$${FINISHED_SIGNAL_THREAD_O}/; \
s/^ScreenGL.*\.o/$${SCREEN_GL_O}/; \
'



MINOR_GEMS_DEPENDENCY_FILE = Makefile.minorGems_dependencies


# build the dependency file 

${MINOR_GEMS_DEPENDENCY_FILE}: ${MINOR_GEMS_SOURCE}
	rm -f ${MINOR_GEMS_DEPENDENCY_FILE}
	${COMPILE} -I${ROOT_PATH} -MM ${MINOR_GEMS_SOURCE} >> ${MINOR_GEMS_DEPENDENCY_FILE}.temp
	cat ${MINOR_GEMS_DEPENDENCY_FILE}.temp | ${MINOR_GEMS_SED_FIX_COMMAND} >> ${MINOR_GEMS_DEPENDENCY_FILE}
	rm -f ${MINOR_GEMS_DEPENDENCY_FILE}.temp

include ${MINOR_GEMS_DEPENDENCY_FILE}






