X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fapp_test%2FMakefile;h=822447761b556ce1bcb131a91f7fcdff7f28aa2c;hb=e2c0690497a2db5659b3e138e4e106d70fee4aab;hp=fe4cd33607c91b77698113129e2730da8d9f10e8;hpb=02e8d49f42d94b51494977aa0d6f67479f1ceb1c;p=ric-plt%2Flib%2Frmr.git diff --git a/test/app_test/Makefile b/test/app_test/Makefile index fe4cd33..8224477 100644 --- a/test/app_test/Makefile +++ b/test/app_test/Makefile @@ -1,7 +1,7 @@ # #================================================================================= -# Copyright (c) 2019-2020 Nokia -# Copyright (c) 2018-2020 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. @@ -36,10 +36,11 @@ 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 @@ -47,28 +48,18 @@ LIBRARY_PATH = $(LD_LIBRARY_PATH) .PHONY: all all_si -all: sender receiver caller mt_receiver v_sender ex_rts_receiver +all: sender receiver caller mt_receiver v_sender ex_rts_receiver all_si: sender_si receiver_si -# ------ nng based builds ------------------------------------------------------------ +# ------ all builds are si95 now --------------------------------------------------- %:%.c - gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_nng -lnng -lpthread -lm - -# special build as it reuses an existing source module -mt_receiver: receiver.c - gcc -I $${C_INCLUDE_PATH:-.} -DMTC $< -g -o $@ -lrmr_nng -lnng -lpthread -lm - - -# ----- si test builds ------------------------------------------------------------- - -%_si : %.c gcc -I $${C_INCLUDE_PATH:-.} $< -g -o $@ -lrmr_si -lpthread -lm -# explicit rule because there is no mt_recever.c -mt_receiver_si: receiver.c +# 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