blob: ca547bb634f95cf0bda7bc87157ddfce02e720d9 [file] [log] [blame]
Harald Welteac359802017-04-12 12:13:44 +02001# This Makefile was generated by the Makefile Generator
2# of the TTCN-3 Test Executor version CRL 113 200/6 R1A
Harald Welte0872b682017-04-12 12:17:55 +02003# for Harald Welte (laforge@nataraja) on Wed Apr 12 11:16:09 2017
Harald Welteac359802017-04-12 12:13:44 +02004
Harald Welte0872b682017-04-12 12:17:55 +02005# Copyright (c) 2000-2016 Ericsson Telecom AB
Harald Welteac359802017-04-12 12:13:44 +02006
7# The following make commands are available:
8# - make, make all Builds the executable test suite.
9# - make archive Archives all source files.
10# - make check Checks the semantics of TTCN-3 and ASN.1modules.
11# - make port Generates port skeletons.
12# - make clean Removes all generated files.
13# - make compile Translates TTCN-3 and ASN.1 modules to C++.
14# - make dep Creates/updates dependency list.
15# - make executable Builds the executable test suite.
16# - make library Builds the library archive.
17# - make objects Builds the object files without linking the executable.
18#
19# Set these variables...
20#
21
22# The path of your TTCN-3 Test Executor installation:
23# Uncomment this line to override the environment variable.
Harald Welte0872b682017-04-12 12:17:55 +020024# The value below points to the location of the TITAN version
25# that generated this makefile.
26TTCN3_DIR = /usr
Harald Welteac359802017-04-12 12:13:44 +020027
28# Your platform: (SOLARIS, SOLARIS8, LINUX, FREEBSD or WIN32)
29PLATFORM = LINUX
30
31# Your C++ compiler:
32# (if you change the platform, you may need to change the compiler)
33CXX = g++
34
35# Flags for the C++ preprocessor (and makedepend as well):
Harald Welte0872b682017-04-12 12:17:55 +020036CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include/titan
Harald Welteac359802017-04-12 12:13:44 +020037
38# Flags for the C++ compiler:
39CXXFLAGS = -Wall
40
41# Flags for the linker:
Harald Welte0872b682017-04-12 12:17:55 +020042LDFLAGS = -L$(TTCN3_DIR)/lib/titan
Harald Welteac359802017-04-12 12:13:44 +020043
44ifeq ($(PLATFORM), WIN32)
45# Silence linker warnings.
46LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc
47endif
48
49# Utility to create library files
50AR = ar
51ARFLAGS =
52
53# Flags for the TTCN-3 and ASN.1 compiler:
54COMPILER_FLAGS = -L
55
56# Execution mode: (either ttcn3 or ttcn3-parallel)
57TTCN3_LIB = ttcn3-parallel
58
Harald Welteac359802017-04-12 12:13:44 +020059# The path of your libxml2 installation:
60# If you do not have your own one, leave it unchanged.
61XMLDIR = $(TTCN3_DIR)
62
63# Directory to store the archived source files:
64# Note: you can set any directory except ./archive
65ARCHIVE_DIR = backup
66
67#
68# You may change these variables. Add your files if necessary...
69#
70
71# TTCN-3 modules of this project:
72TTCN3_MODULES = General_Types.ttcn M3UA_Emulation.ttcn M3UA_Types.ttcn MTP3asp_PortType.ttcn MTP3asp_Types.ttcn SCCP_Emulation.ttcn SCCP_Mapping.ttcn SCCP_Testcases.ttcn SCCP_Types.ttcn SCCPasp_Types.ttcn SCTPasp_PortType.ttcn SCTPasp_Types.ttcn
73
74# ASN.1 modules of this project:
75ASN1_MODULES =
76
77# C++ source & header files generated from the TTCN-3 & ASN.1 modules of
78# this project:
79GENERATED_SOURCES = General_Types.cc M3UA_Emulation.cc M3UA_Types.cc MTP3asp_PortType.cc MTP3asp_Types.cc SCCP_Emulation.cc SCCP_Mapping.cc SCCP_Testcases.cc SCCP_Types.cc SCCPasp_Types.cc SCTPasp_PortType.cc SCTPasp_Types.cc
80GENERATED_HEADERS = General_Types.hh M3UA_Emulation.hh M3UA_Types.hh MTP3asp_PortType.hh MTP3asp_Types.hh SCCP_Emulation.hh SCCP_Mapping.hh SCCP_Testcases.hh SCCP_Types.hh SCCPasp_Types.hh SCTPasp_PortType.hh SCTPasp_Types.hh
81
82# C/C++ Source & header files of Test Ports, external functions and
83# other modules:
84USER_SOURCES = SCTPasp_PT.cc
85USER_HEADERS = SCTPasp_PT.hh
86
87# Object files of this project that are needed for the executable test suite:
88OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
89
90GENERATED_OBJECTS = General_Types.o M3UA_Emulation.o M3UA_Types.o MTP3asp_PortType.o MTP3asp_Types.o SCCP_Emulation.o SCCP_Mapping.o SCCP_Testcases.o SCCP_Types.o SCCPasp_Types.o SCTPasp_PortType.o SCTPasp_Types.o
91
92USER_OBJECTS = SCTPasp_PT.o
93
94# Other files of the project (Makefile, configuration files, etc.)
95# that will be added to the archived source files:
96OTHER_FILES = Makefile
97
98# The name of the executable test suite:
99EXECUTABLE = SCCP_Test
100
101
102
103LIBRARY = lib$(EXECUTABLE).a
104
105TARGET = $(EXECUTABLE)
106
107#
108# Do not modify these unless you know what you are doing...
109# Platform specific additional libraries:
110#
Harald Welte0872b682017-04-12 12:17:55 +0200111SOLARIS_LIBS = -lsocket -lnsl -lxml2
112SOLARIS8_LIBS = -lsocket -lnsl -lxml2
113LINUX_LIBS = -lxml2
Harald Welteac359802017-04-12 12:13:44 +0200114FREEBSD_LIBS = -lxml2
115WIN32_LIBS = -lxml2
116
117#
118# Rules for building the executable...
119#
120
121all: $(TARGET) ;
122
123executable: $(EXECUTABLE) ;
124
125library: $(LIBRARY) ;
126
127objects: $(OBJECTS) compile;
128
129$(EXECUTABLE): $(OBJECTS)
130 if $(CXX) $(LDFLAGS) -o $@ $(OBJECTS) \
131 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
132 -L$(OPENSSL_DIR)/lib -lcrypto \
133 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
134 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
135
136$(LIBRARY): $(OBJECTS)
137 $(AR) -r $(ARFLAGS) $(LIBRARY) $(OBJECTS)
138
139%.o: %.c $(GENERATED_HEADERS)
140 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
141
142%.o: %.cc $(GENERATED_HEADERS)
143 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
144
145$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
146 @if [ ! -f $@ ]; then rm -f compile; $(MAKE) compile; fi
147
148check: $(TTCN3_MODULES) $(ASN1_MODULES)
149 $(TTCN3_DIR)/bin/compiler -s $(COMPILER_FLAGS) \
150 $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES)
151
152port: $(TTCN3_MODULES) $(ASN1_MODULES)
153 $(TTCN3_DIR)/bin/compiler -t $(COMPILER_FLAGS) \
154 $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES)
155
156compile: $(TTCN3_MODULES) $(ASN1_MODULES)
157 $(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) \
158 $(TTCN3_MODULES) $(ASN1_MODULES) - $?
159 touch $@
160
161clean:
162 -rm -f $(EXECUTABLE) $(LIBRARY) $(OBJECTS) $(GENERATED_HEADERS) \
163 $(GENERATED_SOURCES) compile \
164 tags *.log
165
166dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
167 makedepend $(CPPFLAGS) -DMAKEDEPEND_RUN $(GENERATED_SOURCES) $(USER_SOURCES)
168
169archive:
170 mkdir -p $(ARCHIVE_DIR)
171 tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \
172 $(USER_HEADERS) $(USER_SOURCES) $(OTHER_FILES) \
173 | gzip >$(ARCHIVE_DIR)/`basename $(TARGET) .exe`-`date '+%y%m%d-%H%M'`.tgz
174
175diag:
176 $(TTCN3_DIR)/bin/compiler -v 2>&1
177 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
178 $(CXX) -v 2>&1
179 $(AR) -V 2>&1
180 @echo TTCN3_DIR=$(TTCN3_DIR)
181 @echo OPENSSL_DIR=$(OPENSSL_DIR)
182 @echo XMLDIR=$(XMLDIR)
183 @echo PLATFORM=$(PLATFORM)
184
185#
186# Add your rules here if necessary...
187#
188