1 #==================================================================================
2 # Copyright (c) 2019 Nokia
3 # Copyright (c) 2018-2019 AT&T Intellectual Property.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #==================================================================================
19 # NOTE: this makefile assumes that RMr has been built using the directory .build
20 # at the top most repo directory (e.g. ../../.build). It can be changed
21 # if you need to by adding "build_path=<path>" to the make command line.
23 .EXPORT_ALL_VARIABLES:
28 build_path ?= ../../.build
29 header_path := $(shell find ../../.build -name 'rmr.h' |head -1 | sed 's!/rmr/.*!!' )
31 C_INCLUDE_PATH := $(header_path)
32 LD_LIBRARY_PATH=$(build_path):$(build_path)/lib
33 LIBRARY_PATH = $(LD_LIBRARY_PATH)
35 # These programmes are designed to test some basic application level functions
36 # from the perspective of two communicating processes.
40 all: sender receiver sender_nano receiver_nano
42 receiver_nano: receiver.c
43 gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr -lnanomsg -lpthread -lm
46 gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm
49 gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr -lnanomsg -lpthread -lm
52 gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm
57 rm -f sender sender_nano receiver receiver_nano *.o