diff --git a/teeio-validator/CMakeLists.txt b/teeio-validator/CMakeLists.txt index 8a1cf5c..55c9b8f 100644 --- a/teeio-validator/CMakeLists.txt +++ b/teeio-validator/CMakeLists.txt @@ -26,7 +26,7 @@ endif() SET(LIBSPDM_DIR ${PROJECT_SOURCE_DIR}/../spdm-emu/libspdm) SET(SPDM_EMU_DIR ${PROJECT_SOURCE_DIR}/../spdm-emu) -SET(TEEIO_VALIDATOR_DIR ${PROJECT_SOURCE_DIR}) +SET(TEEIO_VALIDATOR_DIR ${PROJECT_SOURCE_DIR}/teeio_validator) SET(SPDM_DEVICE_DIR ${PROJECT_SOURCE_DIR}) # @@ -246,5 +246,6 @@ ADD_COMPILE_OPTIONS(-DLIBSPDM_CONFIG="${PROJECT_SOURCE_DIR}/include/spdm_lib_con ADD_SUBDIRECTORY(${SPDM_EMU_DIR}/library/pci_tdisp_requester_lib out/pci_tdisp_requester_lib.lib) ADD_SUBDIRECTORY(teeio_validator) + ADD_SUBDIRECTORY(tools) endif() \ No newline at end of file diff --git a/teeio-validator/teeio_validator/CMakeLists.txt b/teeio-validator/teeio_validator/CMakeLists.txt index de9758b..0949c29 100644 --- a/teeio-validator/teeio_validator/CMakeLists.txt +++ b/teeio-validator/teeio_validator/CMakeLists.txt @@ -79,35 +79,5 @@ SET(teeio_validator_LIBRARY platform_lib ) -SET(src_lside - tools/lside.c - tools/ide_common.c - utils.c - pci_ide.c - scan_pci.c - ide_test_ini.c - rp_pci.c) - -SET(lside_LIBRARY - debuglib) - -SET(src_setide - tools/setide.c - tools/ide_common.c - utils.c - pci_ide.c - scan_pci.c - ide_test_ini.c - rp_pci.c) - -SET(setide_LIBRARY - debuglib) - ADD_EXECUTABLE(teeio_validator ${src_teeio_validator}) TARGET_LINK_LIBRARIES(teeio_validator ${teeio_validator_LIBRARY}) - -ADD_EXECUTABLE(lside ${src_lside}) -TARGET_LINK_LIBRARIES(lside ${lside_LIBRARY}) - -ADD_EXECUTABLE(setide ${src_setide}) -TARGET_LINK_LIBRARIES(setide ${setide_LIBRARY}) diff --git a/teeio-validator/tools/CMakeLists.txt b/teeio-validator/tools/CMakeLists.txt new file mode 100644 index 0000000..6e6c884 --- /dev/null +++ b/teeio-validator/tools/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 2.8.12) + +ADD_COMPILE_OPTIONS(-Wno-unused-result -Werror) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + ADD_COMPILE_OPTIONS(-Wno-error=unused-variable -Wno-error=unused-but-set-variable) +endif() + +SET(BUILD_SHARED_LIBS OFF) +SET(CMAKE_EXE_LINKER_FLAGS "-static") + +INCLUDE_DIRECTORIES(${SPDM_DEVICE_DIR}/include + ${LIBSPDM_DIR}/os_stub/spdm_device_secret_lib_sample + ${LIBSPDM_DIR}/include + ${LIBSPDM_DIR}/os_stub/include + ${LIBSPDM_DIR}/os_stub + ${SPDM_EMU_DIR}/include +) + +SET(src_lside + lside.c + ide_common.c + ${TEEIO_VALIDATOR_DIR}/utils.c + ${TEEIO_VALIDATOR_DIR}/pci_ide.c + ${TEEIO_VALIDATOR_DIR}/scan_pci.c + ${TEEIO_VALIDATOR_DIR}/ide_test_ini.c + ${TEEIO_VALIDATOR_DIR}/rp_pci.c) + +SET(lside_LIBRARY + debuglib) + +SET(src_setide + setide.c + ide_common.c + ${TEEIO_VALIDATOR_DIR}/utils.c + ${TEEIO_VALIDATOR_DIR}/pci_ide.c + ${TEEIO_VALIDATOR_DIR}/scan_pci.c + ${TEEIO_VALIDATOR_DIR}/ide_test_ini.c + ${TEEIO_VALIDATOR_DIR}/rp_pci.c) + +SET(setide_LIBRARY + debuglib) + +ADD_EXECUTABLE(lside ${src_lside}) +TARGET_LINK_LIBRARIES(lside ${lside_LIBRARY}) + +ADD_EXECUTABLE(setide ${src_setide}) +TARGET_LINK_LIBRARIES(setide ${setide_LIBRARY}) \ No newline at end of file diff --git a/teeio-validator/teeio_validator/tools/ide_common.c b/teeio-validator/tools/ide_common.c similarity index 100% rename from teeio-validator/teeio_validator/tools/ide_common.c rename to teeio-validator/tools/ide_common.c diff --git a/teeio-validator/teeio_validator/tools/lside.c b/teeio-validator/tools/lside.c similarity index 100% rename from teeio-validator/teeio_validator/tools/lside.c rename to teeio-validator/tools/lside.c diff --git a/teeio-validator/teeio_validator/tools/setide.c b/teeio-validator/tools/setide.c similarity index 100% rename from teeio-validator/teeio_validator/tools/setide.c rename to teeio-validator/tools/setide.c