Advertisement
Guest User

Untitled

a guest
Feb 5th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 2.79 KB | None | 0 0
  1. #
  2. #
  3. #
  4.  
  5. TOP := ../../..
  6. TM_PATH := ${TOP}
  7.  
  8. include $(TOP)/Common/common.mk
  9. include $(TOP)/3rdParty/makevars
  10.  
  11. $(shell mkdir -p ${OBJ_PATH})
  12.  
  13. UnitTest_Srcs = IRSizeConfiguratorTest.cpp
  14.  
  15. SRCS =  ${UnitTest_Srcs}
  16.  
  17. OBJS = $(addprefix ${OBJ_PATH}/, $(addsuffix .o, $(basename $(notdir ${SRCS}))))
  18. DEPS = $(OBJS:.o=.d)
  19.  
  20. CXXFLAGS += -Wno-shadow #catch1
  21.  
  22. CXXFLAGS += -I${TM_PATH}/CommonComponents/ \
  23.             -I${TM_PATH}/Common/ \
  24.             -I${TM_PATH}/Common/Utility/ \
  25.             -I${TM_PATH}/Common/DataTypes/ \
  26.             -I${CATCH_INC_PATH} \
  27.             -I${BOOST_INC_PATH} \
  28.             -I${XERCES_INC_PATH} \
  29.             -I${ACE_INC_PATH} \
  30.             -isystem ${RAPIDJSON_INC_PATH}
  31.  
  32. COMMON_LIBS = ${TOP}/CommonComponents/IntelligenceReport/${TH_LIB_PATH}/libIntelligenceReport.a \
  33.               ${TOP}/CommonComponents/Logging/${TH_LIB_PATH}/libLogging.a \
  34.               ${TOP}/CommonComponents/Common/${TH_LIB_PATH}/libCommonComponentsCommon.a \
  35.               ${TOP}/Common/Utility/${TH_LIB_PATH}/libCommonUtility.a \
  36.               ${TOP}/Common/DataTypes/${TH_LIB_PATH}/libCommonDataTypes.a \
  37.               ${TOP}/Common/OrgIndustry/${TH_LIB_PATH}/libCommonOrgIndustry.a \
  38.               ${TOP}/Common/AppComponents/${TH_LIB_PATH}/libCommonAppComponents.a \
  39.               ${TOP}/Common/ApiStrings/${TH_LIB_PATH}/libCommonApiStrings.a \
  40.               ${TOP}/CommonComponents/OrgDatabaseConfigs/${TH_LIB_PATH}/libCommonComponentsOrgDatabaseConfigs.a \
  41.               ${TOP}/Common/System/${TH_LIB_PATH}/libCommonSystem.a \
  42.               $(TOP)/CommonComponents/Thrift/cpp/${TH_LIB_PATH}/libTmThrift.a \
  43.               ${TOP}/CommonComponents/CentralAttributeRepository/${TH_LIB_PATH}/libCommonComponentsCentralAttributeRepository.a \
  44.               $(TOP)/CommonComponents/Synergy/${TH_LIB_PATH}/libSynergy.a \
  45.               $(TOP)/CommonComponents/PropertyBucket/${TH_LIB_PATH}/libPropertyBucket.a \
  46.               ${TOP}/CommonComponents/THDatabase/${TH_LIB_PATH}/libTHDatabase.a \
  47.               ${TOP}/Common/Crypto/${TH_LIB_PATH}/libCommonCrypto.a \
  48.               ${TOP}/Common/Codec/${TH_LIB_PATH}/libCommonCodec.a
  49.  
  50.  
  51.  
  52.  
  53. LIBS = $(COMMON_LIBS) \
  54.        ${BOOST_SYSTEMLIB_STATIC} \
  55.        ${BOOST_THREADLIB_STATIC} \
  56.        ${ACE_LIB} \
  57.        ${THRIFT_LIBS} \
  58.        ${SCRIBE_LIB} \
  59.        ${OPENSSL_LIBS} \
  60.        ${LIBC_EXT} \
  61.        ${BOOST_REGEXLIB_STATIC} \
  62.        ${BOOST_DATE_TIMELIB_STATIC} \
  63.        ${CSG_STATIC_LIB} \
  64.        ${BOOST_FILESYSTEM_LIBS_STATIC} \
  65.        ${XERCES_LIB} \
  66.        ${ICONV_STATIC_LIB}
  67.  
  68.  
  69. BIN = ir_unit_test
  70.  
  71. all : bin test
  72.  
  73. bin : $(BIN)
  74.  
  75. ${OBJ_PATH}/%.o : %.cpp
  76.     $(CXX) $(CXXFLAGS) $< -c -o $@
  77.  
  78. ir_unit_test: ${OBJS} ${LIBS}
  79.     $(CXX) ${CXXFLAGS} ${CRYPTOMATHIC_LDFLAGS} -lpthread -lodbc -o $@ ${OBJS} -Wl,--start-group ${LIBS} -Wl,--end-group \
  80.     -Xlinker -rpath -Xlinker ${ACE_LIB_PATH} \
  81.     -Xlinker -rpath -Xlinker ${XERCES_LIB_PATH}
  82.  
  83. test: ir_unit_test
  84.     ./$< -r junit -o unittest_results.xml; RC=$$?; if [ $$RC -gt 128 ]; then exit $$RC; fi 
  85.  
  86. .PHONY: test all bin
  87.  
  88. -include ${DEPS}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement