# # Modification History # # 2003-September-5 Jason Rohrer # Created. # # 2003-September-7 Jason Rohrer # Added test program. # # 2003-September-8 Jason Rohrer # Added use of sed to fix auto-generated dependency path. # # 2003-September-9 Jason Rohrer # Fixed clean target. # ## # The portion of MUTE file transfer web server Makefiles common to all # platforms. # Should not be made manually---used by MUTE/configure to build Makefiles. ## ROOT_PATH = ../../.. LAYER_SOURCE = \ fileTransferWebServer.cpp \ FileTransferPageGenerator.cpp LAYER_OBJECTS = ${LAYER_SOURCE:.cpp=.o} NEEDED_MINOR_GEMS_OBJECTS = \ ${WEB_SERVER_O} \ ${CONNECTION_PERMISSION_HANDLER_O} \ ${REQUEST_HANDLING_THREAD_O} \ ${THREAD_HANDLING_THREAD_O} \ ${STOP_SIGNAL_THREAD_O} CRYPTO_LIB = ${ROOT_PATH}/MUTE/crypto/libcrypto.a ROUTING_LIB = ${ROOT_PATH}/MUTE/layers/messageRouting/libmuteMessageRouter.a POINT_TO_POINT_LIB = ${ROOT_PATH}/MUTE/layers/pointToPoint/libmutePointToPoint.a FILE_TRANSFER_LIB = ${ROOT_PATH}/MUTE/layers/fileTransfer/libmuteFileTransfer.a TEST_SOURCE = test/testWebServer.cpp TEST_OBJECTS = ${TEST_SOURCE:.cpp=.o} DEPENDENCY_FILE = Makefile.dependencies # targets all: libmuteFileTransferWebServer.a test/testWebServer clean: rm -f ${DEPENDENCY_FILE} ${LAYER_OBJECTS} ${TEST_OBJECTS} ${NEEDED_MINOR_GEMS_OBJECTS} libmuteFileTransferWebServer.a test/testWebServer libmuteFileTransferWebServer.a: ${LAYER_OBJECTS} ${NEEDED_MINOR_GEMS_OBJECTS} ${LIBRARY_LINK} libmuteFileTransferWebServer.a ${NEEDED_MINOR_GEMS_OBJECTS} ${LAYER_OBJECTS} ${RANLIB} libmuteFileTransferWebServer.a test/testWebServer: libmuteFileTransferWebServer.a test/testWebServer.o ${EXE_LINK} -o test/testWebServer test/testWebServer.o libmuteFileTransferWebServer.a ${FILE_TRANSFER_LIB} ${POINT_TO_POINT_LIB} ${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) FILE_TRANSFER_WEB_SERVER_SED_FIX_COMMAND = sed ' \ s/^testWebServer.o/test\/testWebServer.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 | ${FILE_TRANSFER_WEB_SERVER_SED_FIX_COMMAND} >> ${DEPENDENCY_FILE} rm -f ${DEPENDENCY_FILE}.temp include ${DEPENDENCY_FILE}