# # Modification History # # 2003-October-14 Jason Rohrer # Created. # # 2003-November-6 Jason Rohrer # Added SHA1 object. # # 2003-November-10 Jason Rohrer # Added directory object. # # 2004-January-1 Jason Rohrer # Move URL_UTILS_O object into message routing layer # (for web-based host cache). # ## # The portion of MUTE fileSharing Makefiles common to all platforms. # Should not be made manually---used by MUTE/configure to build Makefiles. ## ROOT_PATH = ../../.. LAYER_SOURCE = \ fileShare.cpp LAYER_OBJECTS = ${LAYER_SOURCE:.cpp=.o} NEEDED_MINOR_GEMS_OBJECTS = \ ${URL_UTILS_O} \ ${MIME_TYPER_O} \ ${SHA1_O} \ ${DIRECTORY_O} CRYPTO_LIB = ${ROOT_PATH}/MUTE/crypto/libcrypto.a ROUTING_LIB = ${ROOT_PATH}/MUTE/layers/messageRouting/libmuteMessageRouter.a TEST_SOURCE = #test/testPointToPoint.cpp test/testCatcher.cpp TEST_OBJECTS = ${TEST_SOURCE:.cpp=.o} DEPENDENCY_FILE = Makefile.dependencies # targets all: libmuteFileShare.a #test/testPointToPoint test/testCatcher clean: rm -f ${DEPENDENCY_FILE} ${LAYER_OBJECTS} ${TEST_OBJECTS} ${NEEDED_MINOR_GEMS_OBJECTS} libmuteFileShare.a #test/testPointToPoint test/testCatcher libmuteFileShare.a: ${LAYER_OBJECTS} ${NEEDED_MINOR_GEMS_OBJECTS} ${LIBRARY_LINK} libmuteFileShare.a ${NEEDED_MINOR_GEMS_OBJECTS} ${LAYER_OBJECTS} ${RANLIB} libmuteFileShare.a test/testPointToPoint: libmutePointToPoint.a test/testPointToPoint.o ${EXE_LINK} -o test/testPointToPoint test/testPointToPoint.o libmutePointToPoint.a ${ROUTING_LIB} ${CRYPTO_LIB} ${PLATFORM_LINK_FLAGS} test/testCatcher: libmutePointToPoint.a test/testCatcher.o ${EXE_LINK} -o test/testCatcher test/testCatcher.o ${ROUTING_LIB} ${CRYPTO_LIB} ${PLATFORM_LINK_FLAGS} # 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) POINT_TO_POINT_SED_FIX_COMMAND = sed ' \ s/^testPointToPoint.o/test\/testPointToPoint.o/; \ s/^testCatcher.o/test\/testCatcher.o/; \ ' # build the dependency file ${DEPENDENCY_FILE}: ${LAYER_SOURCE} ${TEST_SOURCE} rm -f ${DEPENDENCY_FILE} ${COMPILE} -I${ROOT_PATH} -MM ${LAYER_SOURCE} ${TEST_SOURCE} >> ${DEPENDENCY_FILE}.temp cat ${DEPENDENCY_FILE}.temp | ${POINT_TO_POINT_SED_FIX_COMMAND} >> ${DEPENDENCY_FILE} rm -f ${DEPENDENCY_FILE}.temp include ${DEPENDENCY_FILE}