1 ##############################################################################
2 # Copyright (c) 2000-2016 Ericsson Telecom AB
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Eclipse Public License v1.0
5 # which accompanies this distribution, and is available at
6 # http://www.eclipse.org/legal/epl-v10.html
16 ##############################################################################
18 include ..
/Makefile.regression
20 # WARNING! This Makefile can be used with GNU make only.
21 # Other versions of make may report syntax errors in it.
24 # Do NOT touch this line...
26 .PHONY
: all archive
check clean distclean dep objects
31 # Set these variables...
34 # Flags for dependency generation
39 # Execution mode: (either ttcn3 or ttcn3-parallel)
40 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
43 # You may change these variables. Add your files if necessary...
46 # TTCN-3 modules of this project:
47 TTCN3_MODULES
= io.ttcn
49 # ASN.1 modules of this project:
50 ASN1_MODULES
= IOAsn.asn
52 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
54 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
55 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
57 POSTFIXES
:= $(foreach file
, $(SPLIT_TO_SLICES
), $(addsuffix $(file
), _part_
))
58 POSTFIXES
:= $(foreach file
, $(POSTFIXES
), $(addprefix $(file
), .
cc))
59 GENERATED_SOURCES2
:= $(foreach file
, $(GENERATED_SOURCES
:.
cc=), $(addprefix $(file
), $(POSTFIXES
)))
60 GENERATED_SOURCES
+= $(GENERATED_SOURCES2
)
62 # C/C++ Source & header files of Test Ports, external functions and
65 USER_HEADERS
= $(USER_SOURCES
:.
cc=.hh
)
67 # Object files of this project that are needed for the executable test suite:
68 OBJECTS
= $(GENERATED_OBJECTS
) $(USER_OBJECTS
)
70 GENERATED_OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
)
72 USER_OBJECTS
= $(USER_SOURCES
:.
cc=.o
)
74 DEPFILES
= $(USER_OBJECTS
:.o
=.d
) $(GENERATED_OBJECTS
:.o
=.d
)
76 # Other files of the project (Makefile, configuration files, etc.)
77 # that will be added to the archived source files:
78 OTHER_FILES
= Makefile
80 # The name of the executable test suite:
84 # Do not modify these unless you know what you are doing...
85 # Platform specific additional libraries:
87 SOLARIS_LIBS
+= -lsocket
-lnsl
-lxml2
88 SOLARIS8_LIBS
+= -lsocket
-lnsl
-lxml2
90 FREEBSD_LIBS
+= -lxml2
94 # Rules for building the executable...
101 $(TARGET
): $(OBJECTS
)
102 $(CXX
) $(LDFLAGS
) -o
$@
$^ \
103 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
104 -L
$(OPENSSL_DIR
)/lib
-lcrypto \
105 -L
$(XMLDIR
)/lib
$($(PLATFORM
)_LIBS
) \
106 ||
$(TTCN3_DIR
)/bin
/titanver
$(OBJECTS
)
109 $(CXX
) -c
$(CPPFLAGS
) $(CXXFLAGS
) -o
$@
$<
112 @echo Creating dependency file for
'$<'; set
-e
; \
113 $(CXX
) $(CXXDEPFLAGS
) $(CPPFLAGS
) $(CXXFLAGS
) $< \
114 | sed
's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
; \
115 [ -s
$@
] ||
rm -f
$@
117 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
118 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
120 compile
: $(TTCN3_MODULES
) $(ASN1_MODULES
)
121 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
125 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
126 $(GENERATED_SOURCES
) compile
$(DEPFILES
) \
132 dep
: $(GENERATED_SOURCES
) $(USER_SOURCES
) ;
134 ifeq ($(findstring n
,$(MAKEFLAGS
)),)
135 ifeq ($(filter clean distclean check compile archive diag
,$(MAKECMDGOALS
)),)
141 $(TTCN3_DIR
)/bin
/compiler
-v
2>&1
142 $(TTCN3_DIR
)/bin
/mctr_cli
-v
2>&1
144 @echo TTCN3_DIR
=$(TTCN3_DIR
)
145 @echo OPENSSL_DIR
=$(OPENSSL_DIR
)
146 @echo XMLDIR
=$(XMLDIR
)
147 @echo PLATFORM
=$(PLATFORM
)
150 # Add your rules here if necessary...
153 run
: $(TARGET
) config.cfg