diff options
author | David Marcaccini <david.marcaccini@multitech.com> | 2019-05-08 15:06:52 -0500 |
---|---|---|
committer | David Marcaccini <david.marcaccini@multitech.com> | 2019-05-08 15:06:52 -0500 |
commit | 0e465616dee18a2a596bf1e044e8b81960994c3d (patch) | |
tree | ff8b850f4e6c099a750b6c7aacc428c8c1ea133c | |
parent | 92b102013fe546a85b309bacc16736c0b2a37cb7 (diff) | |
download | mtsazure-0e465616dee18a2a596bf1e044e8b81960994c3d.tar.gz mtsazure-0e465616dee18a2a596bf1e044e8b81960994c3d.tar.bz2 mtsazure-0e465616dee18a2a596bf1e044e8b81960994c3d.zip |
tweaks to makefile and toolchain file
-rw-r--r-- | Makefile | 17 | ||||
-rw-r--r-- | toolchain.cmake | 4 |
2 files changed, 9 insertions, 12 deletions
@@ -4,28 +4,23 @@ # contact: david.marcaccini@multitech.com INCLUDE_DIRS= \ - -I./azure-iot-sdk-c/iothub_client/inc/ \ - -I./azure-iot-sdk-c/deps/umock-c/inc/ \ - -I./azure-iot-sdk-c/deps/azure-macro-utils-c/inc/ \ - -I./azure-iot-sdk-c/c-utility/inc/ + -I./azure-iot-sdk-c/iothub_client/inc \ + -I./azure-iot-sdk-c/deps/umock-c/inc \ + -I./azure-iot-sdk-c/deps/azure-macro-utils-c/inc \ + -I./azure-iot-sdk-c/c-utility/inc LIB_DIRS= \ - -L./azure-iot-sdk-c/cmake/iotsdk_linux/iothub_client/ + -L./azure-iot-sdk-c/cmake/iotsdk_linux/iothub_client LDFLAGS= \ -liothub_client all: mtsazure -mtsazure: src/mtsazure.c libiothub_client.so - bash -c "if [[ -d "./azure-iot-sdk-c/.git" ]]; then cd ./azure-iot-sdk-c; git pull; else rm -rf ./azure-iot-sdk-c; git clone --recursive https://github.com/Azure/azure-iot-sdk-c.git; fi" - sed -i 's/option(build_as_dynamic "build the IoT SDK libaries as dynamic" OFF)/option(build_as_dynamic "build the IoT SDK libaries as dynamic" ON)/' ./azure-iot-sdk-c/CMakeLists.txt +mtsazure: src/mtsazure.c $$CC -O2 -o $@ $< $(INCLUDE_DIRS) $(LIB_DIRS) $(LDFLAGS) arm-mlinux-linux-gnueabi-strip $@ -libiothub_client.so: - bash -c "source /opt/mlinux/4.0.0dev11/environment-setup-arm926ejste-mlinux-linux-gnueabi && cd ./azure-iot-sdk-c && ./build_all/linux/build.sh --toolchain-file ../toolchain.cmake;" - .PHONY: install: mtsazure mkdir -p $(DESTDIR)/usr/bin diff --git a/toolchain.cmake b/toolchain.cmake index 8a51408..4048fb0 100644 --- a/toolchain.cmake +++ b/toolchain.cmake @@ -4,7 +4,9 @@ SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_SYSTEM_PROCESSOR ARM) SET(CMAKE_SYSTEM_VERSION 1) -SET(CROSS_COMPILE arm-mlinux-linux-eabi-) +SET(CROSS_COMPILE arm-mlinux-linux-gnueabi-gcc) +SET(CMAKE_C_COMPILER arm-mlinux-linux-gnueabi-gcc) +SET(CMAKE_CXX_COMPILER arm-mlinux-linux-gnueabi-gcc) SET(CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT}) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |