From 58245bab60927c084431cef970057c8172c0a431 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Tue, 3 Nov 2015 15:27:27 +0100 Subject: [PATCH] tests/zep: simplified Makefile --- tests/zep/Makefile | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/tests/zep/Makefile b/tests/zep/Makefile index cb94a6af4e..4c65e3c364 100644 --- a/tests/zep/Makefile +++ b/tests/zep/Makefile @@ -14,31 +14,16 @@ USEMODULE += gnrc_pktdump USEMODULE += shell USEMODULE += shell_commands -ifeq (,$(ZEP_DST)) - # set default - CFLAGS += -DZEP_DST="\"::1\"" -else - CFLAGS += -DZEP_DST="\"$(ZEP_DST)\"" -endif -ifeq (,$(ZEP_SRC_PORT)) - # set default - CFLAGS += -DZEP_SRC_PORT=GNRC_ZEP_DEFAULT_PORT -else - CFLAGS += -DZEP_SRC_PORT=$(ZEP_SRC_PORT) -endif +# set optional default values for ZEP parameters if unset +ZEP_DST ?= "\"::1\"" +ZEP_SRC_PORT ?= GNRC_ZEP_DEFAULT_PORT +ZEP_DST_PORT ?= GNRC_ZEP_DEFAULT_PORT -ifeq (,$(ZEP_DST_PORT)) - # set default - CFLAGS += -DZEP_DST_PORT=GNRC_ZEP_DEFAULT_PORT -else - CFLAGS += -DZEP_DST_PORT=$(ZEP_DST_PORT) -endif - -# add current directory to the include path. Putting it in CFLAGS will make -# it go to the beginning, before the standard includes. -# That way xbee_params.h get's included and auto configuration can pick it up. -CFLAGS += -I$(CURDIR) +# export ZEP parameters +CFLAGS += -DZEP_DST="\"$(ZEP_DST)\"" +CFLAGS += -DZEP_SRC_PORT=$(ZEP_SRC_PORT) +CFLAGS += -DZEP_DST_PORT=$(ZEP_DST_PORT) # one for gnrc_netif_default and one for ZEP CFLAGS += -DGNRC_NETIF_NUMOF=2