You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/10/09 07:19:48 UTC

[GitHub] [mynewt-nimble] mehulhirpara commented on a change in pull request #591: BLE Mesh Model framework

mehulhirpara commented on a change in pull request #591: BLE Mesh Model framework
URL: https://github.com/apache/mynewt-nimble/pull/591#discussion_r332860270
 
 

 ##########
 File path: porting/examples/rpi_gateway/Makefile
 ##########
 @@ -0,0 +1,114 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#  *  http://www.apache.org/licenses/LICENSE-2.0
+#  * Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Toolchain commands
+CROSS_COMPILE ?=
+CC      := ccache $(CROSS_COMPLIE)gcc
+CXX     := ccache $(CROSS_COMPILE)g++
+LD      := $(CROSS_COMPILE)gcc
+AR      := $(CROSS_COMPILE)ar
+AS      := $(CROSS_COMPILE)as
+NM      := $(CROSS_COMPILE)nm
+OBJDUMP := $(CROSS_COMPILE)objdump
+OBJCOPY := $(CROSS_COMPILE)objcopy
+SIZE    := $(CROSS_COMPILE)size
+
+# Configure NimBLE variables
+NIMBLE_ROOT := ../../..
+NIMBLE_CFG_TINYCRYPT := 1
+
+# Skip files that don't build for this port
+NIMBLE_IGNORE := $(NIMBLE_ROOT)/porting/nimble/src/hal_timer.c \
+	$(NIMBLE_ROOT)/porting/nimble/src/os_cputime.c \
+	$(NIMBLE_ROOT)/porting/nimble/src/os_cputime_pwr2.c \
+	$(NULL)
+
+include $(NIMBLE_ROOT)/porting/nimble/Makefile.defs
+include $(NIMBLE_ROOT)/porting/nimble/Makefile.mesh
+include $(NIMBLE_ROOT)/porting/nimble/Makefile.modelframework
+include $(NIMBLE_ROOT)/porting/nimble/Makefile.helper
+
+SRC := $(NIMBLE_SRC)
+
+# Source files for NPL OSAL
+SRC += \
+	$(wildcard $(NIMBLE_ROOT)/porting/npl/linux/src/*.c) \
+	$(wildcard $(NIMBLE_ROOT)/porting/npl/linux/src/*.cc) \
+	$(wildcard $(NIMBLE_ROOT)/nimble/transport/socket/src/*.c) \
+	$(TINYCRYPT_SRC) \
+	$(NULL)
+
+# Source files for demo app
+SRC += \
+	./ble.c \
+	./main.cc \
+	./bt_mesh_node.c \
+	./mqtt.cc \
+	./raspberry_osio_client/raspberry_osio_client.cc \
+	$(NULL)
+
+# Add NPL and all NimBLE directories to include paths
+INC = \
+	./include \
+	./raspberry_osio_client \
+	$(NIMBLE_ROOT)/porting/npl/linux/include \
+	$(NIMBLE_ROOT)/porting/npl/linux/src \
+	$(NIMBLE_ROOT)/nimble/transport/socket/include \
+	$(NIMBLE_INCLUDE) \
+	$(TINYCRYPT_INCLUDE) \
+	$(NULL)
+
+INCLUDES := $(addprefix -I, $(INC))
+
+SRC_C  = $(filter %.c,  $(SRC))
+SRC_CC = $(filter %.cc, $(SRC))
+
+OBJ := $(SRC_C:.c=.o)
+OBJ += $(SRC_CC:.cc=.o)
+
+TINYCRYPT_OBJ := $(TINYCRYPT_SRC:.c=.o)
+
+CFLAGS =                    \
+    $(NIMBLE_CFLAGS)        \
+    $(INCLUDES)             \
+    -g                      \
+    -D_GNU_SOURCE           \
+    -std=c++11              \
+    $(NULL)
+
+LIBS := -lrt -lpthread -lstdc++ -lmosquitto -ljsoncpp
+
+.PHONY: all clean
+.DEFAULT: all
+
+all: nimble-linux-blemesh
 
 Review comment:
   It's already changed in latest commit [2ce5536](https://github.com/mehulhirpara/mynewt-nimble/commit/2ce5536327961ef927df172da1eec63fa1ea19ba)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services