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
14 ##############################################################################
16 include ..
/Makefile.regression
19 # Do NOT touch this line...
21 .PHONY
: all run archive
check clean dep objects
26 # Set these variables...
29 #CXXFLAGS += -save-temps
32 # Flags for dependency generation
37 # Flags for the linker:
40 ifeq ($(PLATFORM
), WIN32
)
41 # Silence linker warnings.
42 LDFLAGS
+= -Wl
,--enable-auto-import
,--enable-runtime-pseudo-reloc
45 # Flags for the TTCN-3 and ASN.1 compiler:
48 # Execution mode: (either ttcn3 or ttcn3-parallel)
49 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
52 # TTCN-3 modules of this project:
53 TTCN3_MODULES
= slider.ttcn dual.ttcn dual2.ttcn
56 TTCN3_MODULES
+= dualnegtest.ttcn
60 # ASN.1 modules of this project:
63 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
65 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
66 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
68 # C/C++ Source & header files of Test Ports, external functions and
70 USER_SOURCES
= PT1.
cc UNDER.
cc
71 USER_HEADERS
= $(USER_SOURCES
:.
cc=.hh
)
73 # Object files of this project that are needed for the executable test suite:
74 OBJECTS
= $(GENERATED_OBJECTS
) $(USER_OBJECTS
)
76 GENERATED_OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
)
78 USER_OBJECTS
= $(USER_SOURCES
:.
cc=.o
)
80 DEPFILES
= $(USER_OBJECTS
:.o
=.d
) $(GENERATED_OBJECTS
:.o
=.d
)
82 # Other files of the project (Makefile, configuration files, etc.)
83 # that will be added to the archived source files:
84 OTHER_FILES
= Makefile
86 # The name of the executable test suite:
87 TARGET
= slider
$(EXESUFFIX
)
90 # Rules for building the executable...
98 $(TTCN3_DIR
)/bin
/titanver
$(OBJECTS
)
99 $(CXX
) $(LDFLAGS
) -o
$@
$^ \
100 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
101 -L
$(OPENSSL_DIR
)/lib
-lcrypto \
102 -L
$(XMLDIR
)/lib
$($(PLATFORM
)_LIBS
)
105 $(CXX
) -c
$(CPPFLAGS
) $(CXXFLAGS
) -o
$@
$<
108 @echo Creating dependency file for
'$<'; set
-e
; \
109 $(CXX
) $(CXXDEPFLAGS
) $(CPPFLAGS
) $(CXXFLAGS
) $< \
110 | sed
's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
; \
111 [ -s
$@
] ||
rm -f
$@
113 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
114 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
116 compile
:: $(TTCN3_DIR
)/bin
/compiler
# $(TTCN3_COMPILER)
117 @if
[ -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
119 compile
:: $(TTCN3_MODULES
) $(ASN1_MODULES
)
120 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
124 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
125 $(GENERATED_SOURCES
) compile
$(DEPFILES
) \
128 dep
: $(GENERATED_SOURCES
) $(USER_SOURCES
) ;
130 ifeq ($(findstring n
,$(MAKEFLAGS
)),)
131 ifeq ($(filter clean distclean check compile archive diag
,$(MAKECMDGOALS
)),)
138 # Add your rules here if necessary...
140 run
: $(TARGET
) run
$(RT2_SUFFIX
).cfg
143 # don't write the log, it confuses Eclipse
146 rm -f compile
; $(MAKE
) run
148 run-rt2.cfg
: run.cfg Makefile
149 perl
-pwle
's/^(dual2)$$/$$1\ndualnegtest/' $< > $@
151 run-dynamic.cfg
: run.cfg
154 run-rt2-dynamic.cfg
: run-rt2.cfg
159 $(foreach src
, $(USER_SOURCES
), $(eval vpath
$(src
) $(ABS_SRC
)))