From 0e465616dee18a2a596bf1e044e8b81960994c3d Mon Sep 17 00:00:00 2001 From: David Marcaccini Date: Wed, 8 May 2019 15:06:52 -0500 Subject: tweaks to makefile and toolchain file --- Makefile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c74dc92..ecf6d33 100644 --- a/Makefile +++ b/Makefile @@ -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 -- cgit v1.2.3