Files
rocm-systems/tests/kfdtest/sp3/lib_helper/CMakeLists_sp3.txt
T
Mukul Joshi da3abfb0f8 Update build script for SP3 static library
Update build script and CMakeLists_sp3.txt file as SP3 directory
structure has changed.
The SP3 source code with gfx90a suport is merged into a
new branch mukjoshi/sp3_gfx90a.
Please make sure to checkout this branch before using the
build script to generate the static library.

Change-Id: I2bf0ade8b2d254cd7648cc8a6d69a83ee51344cd
2021-02-23 12:20:29 -05:00

80 lines
3.2 KiB
Plaintext

#
# Copyright (C) 2018 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
#
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(amdsp3)
#set ( CMAKE_VERBOSE_MAKEFILE on )
find_package(PkgConfig)
set ( P4_PATH $ENV{WORK_ROOT}/p4/driver/drivers )
set ( SCLIB_SRC ${PROJECT_SOURCE_DIR} )
#if( DEFINED ENV{SCLIB_SRC} )
# set ( SCLIB_SRC $ENV{SCLIB_SRC} )
#else()
# set ( SCLIB_SRC ${P4_PATH}/sc/Chip )
#endif()
include_directories(${SCLIB_SRC}/sp3)
#include_directories(${SCLIB_SRC}/sp3/release_headers)
include_directories(${SCLIB_SRC}/sp3/gen)
set ( SRC_FILES ${SRC_FILES} ${SCLIB_SRC}/sp3/sp3-asic.c )
set ( SRC_FILES ${SRC_FILES} ${SCLIB_SRC}/sp3/sp3-dispatch.c )
set ( SRC_FILES ${SRC_FILES} ${SCLIB_SRC}/sp3/sp3-eval.c )
set ( SRC_FILES ${SRC_FILES} ${SCLIB_SRC}/sp3/sp3-gc.c )
set ( SRC_FILES ${SRC_FILES} ${SCLIB_SRC}/sp3/sp3-int.c )
set ( SRC_FILES ${SRC_FILES} ${SCLIB_SRC}/sp3/sp3-lib.c )
set ( SRC_FILES ${SRC_FILES} ${SCLIB_SRC}/sp3/sp3-native.c )
set ( SRC_FILES ${SRC_FILES} ${SCLIB_SRC}/sp3/sp3-cipher.c )
set ( SRC_FILES ${SRC_FILES} ${SCLIB_SRC}/sp3/sp3-vm.c )
aux_source_directory(${SCLIB_SRC}/sp3/gen SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/si/lib SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/ci/lib SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/gfx8/lib SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/gfx81/lib SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/gfx9/lib SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/gfx10/lib SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/aldbrn/lib SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/gfx81/arch SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/gfx9/arch SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/gfx10/arch SRC_FILES)
aux_source_directory(${SCLIB_SRC}/sp3/backend/aldbrn/arch SRC_FILES)
message( STATUS "PROJECT_SOURCE_DIR:" ${PROJECT_SOURCE_DIR} )
#message( STATUS "SRC_FILES: ")
#foreach(file ${SRC_FILES})
# message(STATUS "${file}")
#endforeach()
set ( CMAKE_C_FLAGS "-DSP3_STATIC_LIB -Wno-error -DPUBLIC_RELEASE -DLITTLEENDIAN_CPU -fPIC -DGFX101_BUILD -DALDBRN_BUILD" )
add_library(amdsp3 ${SRC_FILES})