X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fapp_test%2FMakefile;h=822447761b556ce1bcb131a91f7fcdff7f28aa2c;hb=refs%2Fchanges%2F25%2F5925%2F2;hp=019f3e2fcb748f0ccbf47851cb16decb80ff19d6;hpb=d9de79acd9c205dc4f795e90a98331628ed6c85b;p=ric-plt%2Flib%2Frmr.git diff --git a/test/app_test/Makefile b/test/app_test/Makefile index 019f3e2..8224477 100644 --- a/test/app_test/Makefile +++ b/test/app_test/Makefile @@ -1,7 +1,7 @@ # #================================================================================= -# Copyright (c) 2019 Nokia -# Copyright (c) 2018-2019 AT&T Intellectual Property. +# Copyright (c) 2019-2021 Nokia +# Copyright (c) 2018-2021 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. @@ -17,10 +17,10 @@ #================================================================================== # -# NOTE: this makefile assumes that RMr has been built using the directory .build +# 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. -# To use this makefile to build on a system where RMr is already installed +# To use this makefile to build on a system where RMR is already installed # try: make build_path=/usr/local/lib # # By default we prefer the Korn shell (it's just better). If you really need @@ -36,44 +36,34 @@ SHELL ?= /bin/ksh ex_cflags = $(shell echo $$EX_CFLAGS ) build_path ?= ../../.build -header_path := $(shell find $(build_path) -name 'rmr.h' |head -1 | sed 's!/rmr/.*!!' ) +header_path := $(shell find $(build_path) -name 'rmr.h' 2>/dev/null |head -1 | sed 's!/rmr/.*!!' ) -C_INCLUDE_PATH := $(header_path) -LD_LIBRARY_PATH=$(build_path):$(build_path)/lib +# use from environment if there so as to allow build to reference installed base +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, or more, communicating processes. -.PHONY: all -all: sender receiver caller mt_receiver v_sender ex_rts_receiver +.PHONY: all all_si +all: sender receiver caller mt_receiver v_sender ex_rts_receiver -receiver: receiver.c - gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm +all_si: sender_si receiver_si -mt_receiver: receiver.c - gcc -I $${C_INCLUDE_PATH:-.} -DMTC $< -g -o $@ -lrmr_nng -lnng -lpthread -lm - -lreceiver: lreceiver.c - gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm -ex_rts_receiver: ex_rts_receiver.c - gcc $(ex_cflags) -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm +# ------ all builds are si95 now --------------------------------------------------- -v_sender: v_sender.c - gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm +%:%.c + gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_si -lpthread -lm -sender: sender.c - gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm - -caller: caller.c - gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm +# special build rule as it reuses an existing source module with a sepcial define +mt_receiver: receiver.c + gcc -I $${C_INCLUDE_PATH:-.} -DMTC $< -g -o $@ -lrmr_si -lpthread -lm -lcaller: lcaller.c - gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm -lsender: lsender.c +# --------- housekeeping ----------------------------------------------------------- # clean removes intermediates; nuke removes everything that can be built .PHONY: clean nuke