X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fapp_test%2FMakefile;fp=test%2Fapp_test%2FMakefile;h=cd6933ec4eeabcc0586b772718758f36004336ec;hb=e8a5b2c912d4be9cc93bc52ad7a460b57321c5fd;hp=0000000000000000000000000000000000000000;hpb=966c7d60bb790ccebdfbc2d62fdba72680b523b6;p=ric-plt%2Flib%2Frmr.git diff --git a/test/app_test/Makefile b/test/app_test/Makefile new file mode 100644 index 0000000..cd6933e --- /dev/null +++ b/test/app_test/Makefile @@ -0,0 +1,57 @@ +#================================================================================== +# Copyright (c) 2019 Nokia +# Copyright (c) 2018-2019 AT&T Intellectual Property. +# +# Licensed 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. +#================================================================================== +# + +# NOTE: this makefile assumes that RMr has been built using the directory .build +# at the top most repo directory (e.g. ../../.build). It can be changed +# if you need to by adding "build_path=" to the make command line. + +.EXPORT_ALL_VARIABLES: +.ONESHELL: +.SHELLFLAGS = -e +SHELL = /bin/ksh + +build_path ?= ../../.build +header_path := $(shell find ../../.build -name 'rmr.h' |head -1 | sed 's!/rmr/.*!!' ) + +C_INCLUDE_PATH := $(header_path) +LD_LIBRARY_PATH=$(build_path):$(build_path)/lib +LIBRARY_PATH = $(LD_LIBRARY_PATH) + +# These programmes are designed to test some basic application level functions +# from the perspective of two communicating processes. + + +.PHONY: all +all: sender receiver sender_nano receiver_nano + +receiver_nano: receiver.c + gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr -lnanomsg -lpthread -lm + +receiver: receiver.c + gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm + +sender_nano: sender.c + gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr -lnanomsg -lpthread -lm + +sender: sender.c + gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm + + +.PHONY: clean +clean: + rm -f sender sender_nano receiver receiver_nano *.o