blob: 120c4ec4542a724afd89ed88b2d60435624bf9d5 [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
3# for Elemer Lelik (ethlel@esekilxxen1846) on Wed Apr 12 09:00:44 2017
4
5# Copyright (c) 2000-2017 Ericsson Telecom AB
6
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.
24# TTCN3_DIR =
25
26# Your platform: (SOLARIS, SOLARIS8, LINUX, FREEBSD or WIN32)
27PLATFORM = LINUX
28
29# Your C++ compiler:
30# (if you change the platform, you may need to change the compiler)
31CXX = g++
32
33# Flags for the C++ preprocessor (and makedepend as well):
34CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include
35
36# Flags for the C++ compiler:
37CXXFLAGS = -Wall
38
39# Flags for the linker:
40LDFLAGS =
41
42ifeq ($(PLATFORM), WIN32)
43# Silence linker warnings.
44LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc
45endif
46
47# Utility to create library files
48AR = ar
49ARFLAGS =
50
51# Flags for the TTCN-3 and ASN.1 compiler:
52COMPILER_FLAGS = -L
53
54# Execution mode: (either ttcn3 or ttcn3-parallel)
55TTCN3_LIB = ttcn3-parallel
56
57# The path of your OpenSSL installation:
58# If you do not have your own one, leave it unchanged.
59OPENSSL_DIR = $(TTCN3_DIR)
60
61# The path of your libxml2 installation:
62# If you do not have your own one, leave it unchanged.
63XMLDIR = $(TTCN3_DIR)
64
65# Directory to store the archived source files:
66# Note: you can set any directory except ./archive
67ARCHIVE_DIR = backup
68
69#
70# You may change these variables. Add your files if necessary...
71#
72
73# TTCN-3 modules of this project:
74TTCN3_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
75
76# ASN.1 modules of this project:
77ASN1_MODULES =
78
79# C++ source & header files generated from the TTCN-3 & ASN.1 modules of
80# this project:
81GENERATED_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
82GENERATED_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
83
84# C/C++ Source & header files of Test Ports, external functions and
85# other modules:
86USER_SOURCES = SCTPasp_PT.cc
87USER_HEADERS = SCTPasp_PT.hh
88
89# Object files of this project that are needed for the executable test suite:
90OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
91
92GENERATED_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
93
94USER_OBJECTS = SCTPasp_PT.o
95
96# Other files of the project (Makefile, configuration files, etc.)
97# that will be added to the archived source files:
98OTHER_FILES = Makefile
99
100# The name of the executable test suite:
101EXECUTABLE = SCCP_Test
102
103
104
105LIBRARY = lib$(EXECUTABLE).a
106
107TARGET = $(EXECUTABLE)
108
109#
110# Do not modify these unless you know what you are doing...
111# Platform specific additional libraries:
112#
113SOLARIS_LIBS = -lsocket -lnsl -lxml2 -lresolv
114SOLARIS8_LIBS = -lsocket -lnsl -lxml2 -lresolv
115LINUX_LIBS = -lxml2 -lpthread -lrt
116FREEBSD_LIBS = -lxml2
117WIN32_LIBS = -lxml2
118
119#
120# Rules for building the executable...
121#
122
123all: $(TARGET) ;
124
125executable: $(EXECUTABLE) ;
126
127library: $(LIBRARY) ;
128
129objects: $(OBJECTS) compile;
130
131$(EXECUTABLE): $(OBJECTS)
132 if $(CXX) $(LDFLAGS) -o $@ $(OBJECTS) \
133 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
134 -L$(OPENSSL_DIR)/lib -lcrypto \
135 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
136 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
137
138$(LIBRARY): $(OBJECTS)
139 $(AR) -r $(ARFLAGS) $(LIBRARY) $(OBJECTS)
140
141%.o: %.c $(GENERATED_HEADERS)
142 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
143
144%.o: %.cc $(GENERATED_HEADERS)
145 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
146
147$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
148 @if [ ! -f $@ ]; then rm -f compile; $(MAKE) compile; fi
149
150check: $(TTCN3_MODULES) $(ASN1_MODULES)
151 $(TTCN3_DIR)/bin/compiler -s $(COMPILER_FLAGS) \
152 $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES)
153
154port: $(TTCN3_MODULES) $(ASN1_MODULES)
155 $(TTCN3_DIR)/bin/compiler -t $(COMPILER_FLAGS) \
156 $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES)
157
158compile: $(TTCN3_MODULES) $(ASN1_MODULES)
159 $(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) \
160 $(TTCN3_MODULES) $(ASN1_MODULES) - $?
161 touch $@
162
163clean:
164 -rm -f $(EXECUTABLE) $(LIBRARY) $(OBJECTS) $(GENERATED_HEADERS) \
165 $(GENERATED_SOURCES) compile \
166 tags *.log
167
168dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
169 makedepend $(CPPFLAGS) -DMAKEDEPEND_RUN $(GENERATED_SOURCES) $(USER_SOURCES)
170
171archive:
172 mkdir -p $(ARCHIVE_DIR)
173 tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \
174 $(USER_HEADERS) $(USER_SOURCES) $(OTHER_FILES) \
175 | gzip >$(ARCHIVE_DIR)/`basename $(TARGET) .exe`-`date '+%y%m%d-%H%M'`.tgz
176
177diag:
178 $(TTCN3_DIR)/bin/compiler -v 2>&1
179 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
180 $(CXX) -v 2>&1
181 $(AR) -V 2>&1
182 @echo TTCN3_DIR=$(TTCN3_DIR)
183 @echo OPENSSL_DIR=$(OPENSSL_DIR)
184 @echo XMLDIR=$(XMLDIR)
185 @echo PLATFORM=$(PLATFORM)
186
187#
188# Add your rules here if necessary...
189#
190