Dependencies:   MMA7660 LM75B

Committer:
MACRUM
Date:
Sat Jun 30 01:40:30 2018 +0000
Revision:
0:119624335925
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MACRUM 0:119624335925 1 if(NOT YOTTA_TARGET)
MACRUM 0:119624335925 2 INCLUDE(CMakeForceCompiler)
MACRUM 0:119624335925 3 # CROSS COMPILER SETTING
MACRUM 0:119624335925 4 cmake_minimum_required (VERSION 2.8)
MACRUM 0:119624335925 5 SET(CMAKE_SYSTEM_NAME Generic)
MACRUM 0:119624335925 6
MACRUM 0:119624335925 7 project(mbedPal)
MACRUM 0:119624335925 8
MACRUM 0:119624335925 9
MACRUM 0:119624335925 10
MACRUM 0:119624335925 11 SET (PAL_VERSION ${PAL_VERSION_MAJOR}.${PAL_VERSION_MINOR}.${PAL_VERSION_PATCH})
MACRUM 0:119624335925 12
MACRUM 0:119624335925 13 # configure a header file generator .in to pass some of the CMake settings
MACRUM 0:119624335925 14 # to the source code
MACRUM 0:119624335925 15 configure_file (
MACRUM 0:119624335925 16 "${PROJECT_SOURCE_DIR}/pal_version.h.in"
MACRUM 0:119624335925 17 "${PROJECT_BINARY_DIR}/pal_version.h"
MACRUM 0:119624335925 18 )
MACRUM 0:119624335925 19
MACRUM 0:119624335925 20 if ((${OS_BRAND} MATCHES "Linux"))
MACRUM 0:119624335925 21 add_definitions(-DPAL_LINUX)
MACRUM 0:119624335925 22 endif()
MACRUM 0:119624335925 23
MACRUM 0:119624335925 24 ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/Configs/pal_config)
MACRUM 0:119624335925 25
MACRUM 0:119624335925 26 # add the binary tree to the search path for include files
MACRUM 0:119624335925 27 # so that we will find TutorialConfig.h????????????????????????????????????????????????????????????????????????????
MACRUM 0:119624335925 28 ADDSUBDIRS()
MACRUM 0:119624335925 29 else()
MACRUM 0:119624335925 30 set(OS_BRAND "Linux")
MACRUM 0:119624335925 31 set(TLS_LIBRARY "mbedTLS")
MACRUM 0:119624335925 32 set(PAL_MODULE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Source)
MACRUM 0:119624335925 33
MACRUM 0:119624335925 34 # find source files from the relavent directories
MACRUM 0:119624335925 35 set(PAL_IMPL_SOURCE_DIR ${PAL_MODULE_SOURCE_DIR}/PAL-Impl)
MACRUM 0:119624335925 36 set(PAL_PORT_SOURCE_DIR ${PAL_MODULE_SOURCE_DIR}/Port/Reference-Impl/OS_Specific/${OS_BRAND})
MACRUM 0:119624335925 37 set(PAL_TLS_SOURCE_DIR ${PAL_MODULE_SOURCE_DIR}/Port/Reference-Impl/Lib_Specific/${TLS_LIBRARY})
MACRUM 0:119624335925 38 set(PAL_EXAMPLE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Examples/PlatformBSP)
MACRUM 0:119624335925 39
MACRUM 0:119624335925 40 file(GLOB_RECURSE PAL_SRCS "${PAL_IMPL_SOURCE_DIR}/*.c"
MACRUM 0:119624335925 41 "${PAL_PORT_SOURCE_DIR}/Storage/FileSystem/*.c"
MACRUM 0:119624335925 42 "${PAL_PORT_SOURCE_DIR}/Storage/Flash/*.c"
MACRUM 0:119624335925 43 "${PAL_PORT_SOURCE_DIR}/Networking/*.c"
MACRUM 0:119624335925 44 "${PAL_PORT_SOURCE_DIR}/RTOS/*.c"
MACRUM 0:119624335925 45 "${PAL_PORT_SOURCE_DIR}/Update/*.c"
MACRUM 0:119624335925 46 "${PAL_PORT_SOURCE_DIR}/Board_Specific/${PAL_TARGET_DEVICE}/*.c"
MACRUM 0:119624335925 47 "${PAL_EXAMPLE_DIR}/pal_insecure_ROT.c"
MACRUM 0:119624335925 48 "${PAL_TLS_SOURCE_DIR}/*.c")
MACRUM 0:119624335925 49
MACRUM 0:119624335925 50 add_library(${YOTTA_MODULE_NAME} ${PAL_SRCS})
MACRUM 0:119624335925 51
MACRUM 0:119624335925 52 # need to specify the yotta dependency here, otherwise yotta won't consider them when linking against this library
MACRUM 0:119624335925 53 target_link_libraries(${YOTTA_MODULE_NAME} mbedtls mbed-trace)
MACRUM 0:119624335925 54
MACRUM 0:119624335925 55 # includes are taken care of via the module.json extraIncludes mechanism in order to be global
MACRUM 0:119624335925 56 # link libraries are handled by the module.josn dependencies mechanism
MACRUM 0:119624335925 57 endif()