# # Modification History # # 2003-August-26 Jason Rohrer # Created. # # 2003-September-8 Jason Rohrer # Added use of sed to fix auto-generated dependency path. # # 2003-September-9 Jason Rohrer # Fixed clean target. # # 2003-October-2 Jason Rohrer # Moved binary semaphore into message routing layer. # ## # The portion of MUTE pointToPoint Makefiles common to all platforms. # Should not be made manually---used by MUTE/configure to build Makefiles. ## ROOT_PATH = ../../.. LAYER_SOURCE = \ pointToPointCommunicator.cpp LAYER_OBJECTS = ${LAYER_SOURCE:.cpp=.o} NEEDED_MINOR_GEMS_OBJECTS = \ 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: libmutePointToPoint.a test/testPointToPoint test/testCatcher clean: rm -f ${DEPENDENCY_FILE} ${LAYER_OBJECTS} ${TEST_OBJECTS} ${NEEDED_MINOR_GEMS_OBJECTS} libmutePointToPoint.a test/testPointToPoint test/testCatcher libmutePointToPoint.a: ${LAYER_OBJECTS} ${NEEDED_MINOR_GEMS_OBJECTS} ${LIBRARY_LINK} libmutePointToPoint.a ${NEEDED_MINOR_GEMS_OBJECTS} ${LAYER_OBJECTS} ${RANLIB} libmutePointToPoint.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}