#!/usr/bin/env bash
#
# Copyright (C) 2019 The SAM Tool Authors. All rights reserved.
#
#               SAM (S/W Architecture Maturity)
#
# Samsung Research,
# Samsung Electronics Co., Ltd.
#
# This software and its documentation are confidential and proprietary
# information of Samsung Electronics Co., Ltd.  No part of the software and
# documents may be copied, reproduced, transmitted, translated, or reduced to
# any electronic medium or machine-readable form without the prior written
# consent of Samsung Electronics.
#
# Samsung Electronics makes no representations with respect to the contents,
# and assumes no responsibility for any errors that might appear in the
# software and documents. This publication and the contents here of are subject
# to change without notice.
#

PROJECT_PATH="$(dirname $(readlink -f ${BASH_SOURCE}))"

################################
# Project Name
################################
SAM_PRJ_NAME="PROCA"


################################
# Source Code
################################
BUILD_CMD="make -C ${PROJECT_PATH} svace"
CLEAN_CMD="make -C ${PROJECT_PATH} clean"

SRC_PATH=${PROJECT_PATH}
# Normalize
SRC_PATH="$(readlink -f ${SRC_PATH})"
test -e "${SRC_PATH}" \
  || { echo "==> SAM CONFIG ERROR!!!" >&2 && return 1; }

SRC_LANG="auto_c_cpp"

SRC_EXCLUDE=${PROJECT_PATH}/sam_src_exclude.cfg
echo "\
asn1
multibuild
scl
out
thirdparty
" > "${SRC_EXCLUDE}"


################################
# SCRA
################################
SCRA_SKIP=FALSE                             # Options : TRUE, FALSE
SCRA_RAW_DATA_PATH=".scap/workspace/scra"
SCRA_ROOT_TO_CUT=$SRC_PATH
#SCRA_USE_PARAM=TRUE


################################
# ART_BEAN (Convert SCRA data)
################################
ART_BEAN_SKIP=FALSE                         # Options : TRUE, FALSE


################################
# PMD CPD (Duplicated Code)
################################
PMD_SKIP=FALSE                              # Options : TRUE, FALSE
PMD_RAW_DATA_PATH=".scap/workspace/pmd"
PMD_USE_BUILT_PATH=FALSE                    # Options : TRUE, FALSE
PMD_ROOT_TO_CUT=$SRC_PATH
#PMD_EXCLUDE_LIST="config/src_exclude.cfg"  # Excluding list of PMD
#PMD_RESULT_DETAIL_MODE=FALSE               # Options : TRUE, FALSE
#PMD_HEAP_SIZE=2048m
#PMD_ENCODING="utf-8"


################################
# Metrix++ (Preprocessor)
###############################
MPP_SKIP=FALSE
MPP_RAW_DATA_PATH=".scap/workspace/metrixpp"
MPP_ROOT_TO_CUT=$SRC_PATH
#MPP_USE_BUILT_PATH=TRUE


################################
# Advanced Option
################################
#ADVANCED_SAM_OPTION="config/sam.cfg"
#USE_EMBEDDED_LIB=TRUE
#LMCD_INIT=FALSE

SCAP_TOOL_PATH="hub/code-analysis-hub/bin/scap"
SCAP=$SCAP_TOOL_PATH

SEND_DATA_FLAG=FALSE
