From df277258f1d5fbf8ce80c2748c4fb0783359790f Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 20 Feb 2018 15:49:30 +0100 Subject: IPA_Emulation: Make dependencies to RSL/MGCP/SCCP/GSUP conditional Let's use the preprocessor to avoid IPA_Emulation pulling *all* dependencies into each and any of our projects. The code readability suffers a bit from the many #ifdefs, but compilation speed increases if we don't have to pull in all those (recursive) dependencies. After all, a BTS test case will never need SCCP, GSUP or MGCP. Change-Id: Ic0231adbd2171214de133d26b3fbf36130ee8aa0 --- regen-makefile.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'regen-makefile.sh') diff --git a/regen-makefile.sh b/regen-makefile.sh index 7edd7839..57eebff5 100755 --- a/regen-makefile.sh +++ b/regen-makefile.sh @@ -12,7 +12,7 @@ test -x "$(which ttcn3_makefilegen 2>/dev/null)" || { echo "ERROR: ttcn3_makefilegen not in PATH"; exit 1; } -ttcn3_makefilegen -l -f $* +ttcn3_makefilegen -p -l -f $* sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile #sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile @@ -21,6 +21,10 @@ sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 for details sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile +if [ "x$CPPFLAGS_TTCN3" != "x" ]; then + sed -i -e 's/CPPFLAGS_TTCN3 =/CPPFLAGS_TTCN3 = '"$CPPFLAGS_TTCN3"'/' Makefile +fi + # for TITAN 6.3.0 if cat /etc/issue | grep "Arch Linux" >/dev/null 2>&1; then sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr\/ttcn3/' Makefile -- cgit v1.2.3