blob: 181469983e4efe6eb766be5a5b17c7abda2d3080 [file] [log] [blame]
Harald Welte20a58c62017-12-13 01:04:42 +01001#!/bin/sh
2
3# Wrapper around the TITAN make file generator to work in Debian.
4#
5# TITAN has a makefile generator, but somehow Debian seems to install
6# the binaries to different paths without patching the make file
7# generator, leading in inconsistent non-working Makefiles.
8#
9# The regexes below patch the generated Makefile to work on Debian 9 and
10# unstable, so far tested with TITAN 6.1.0, 6.2.0 and 6.3.0
11
12ttcn3_makefilegen -l -f $*
13sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile
14sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile
15#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile
16sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile
17
18# for TITAN 6.3.0
19sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile
20sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile