#!/bin/bash

# directory as demo name
TEST_NAME=${PWD##*/}

SRC=${TEST_NAME}.mm
if [ ! -f ${SRC} ]; then
	SRC=${TEST_NAME}.m
fi

case $(uname -m) in
    x86_64)  clang++ -framework Foundation -I ../../../include -L ../../../lib -lfsdk_oc_mac64 -lssl -lcrypto -Xlinker -rpath -Xlinker ../../../lib ${SRC} -o ${TEST_NAME};;
    arm64)   clang++ -framework Foundation -I ../../../include -L ../../../lib -lfsdk_oc_macarm -lssl -lcrypto -Xlinker -rpath -Xlinker ../../../lib ${SRC} -o ${TEST_NAME};;
esac
./${TEST_NAME}
