1 ###############################################################################
2 # Copyright (c) 2000-2014 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
7 ###############################################################################
9 include ..
/Makefile.regression
12 # Do NOT touch this line...
14 .PHONY
: all run archive
check clean dep objects
19 # Set these variables...
22 #CXXFLAGS += -save-temps
25 # Flags for dependency generation
30 # Flags for the linker:
33 ifeq ($(PLATFORM
), WIN32
)
34 # Silence linker warnings.
35 LDFLAGS
+= -Wl
,--enable-auto-import
,--enable-runtime-pseudo-reloc
38 # Flags for the TTCN-3 and ASN.1 compiler:
41 # Execution mode: (either ttcn3 or ttcn3-parallel)
42 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
45 # TTCN-3 modules of this project:
46 TTCN3_MODULES
= slider.ttcn dual.ttcn dual2.ttcn
49 TTCN3_MODULES
+= dualnegtest.ttcn
53 # ASN.1 modules of this project:
56 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
58 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
59 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
61 # C/C++ Source & header files of Test Ports, external functions and
63 USER_SOURCES
= PT1.
cc UNDER.
cc
64 USER_HEADERS
= $(USER_SOURCES
:.
cc=.hh
)
66 # Object files of this project that are needed for the executable test suite:
67 OBJECTS
= $(GENERATED_OBJECTS
) $(USER_OBJECTS
)
69 GENERATED_OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
)
71 USER_OBJECTS
= $(USER_SOURCES
:.
cc=.o
)
73 DEPFILES
= $(USER_OBJECTS
:.o
=.d
) $(GENERATED_OBJECTS
:.o
=.d
)
75 # Other files of the project (Makefile, configuration files, etc.)
76 # that will be added to the archived source files:
77 OTHER_FILES
= Makefile
79 # The name of the executable test suite:
80 TARGET
= slider
$(EXESUFFIX
)
83 # Rules for building the executable...
91 $(TTCN3_DIR
)/bin
/titanver
$(OBJECTS
)
92 $(CXX
) $(LDFLAGS
) -o
$@
$^ \
93 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
94 -L
$(OPENSSL_DIR
)/lib
-lcrypto \
95 -L
$(XMLDIR
)/lib
$($(PLATFORM
)_LIBS
)
98 $(CXX
) -c
$(CPPFLAGS
) $(CXXFLAGS
) -o
$@
$<
101 @echo Creating dependency file for
'$<'; set
-e
; \
102 $(CXX
) $(CXXDEPFLAGS
) $(CPPFLAGS
) $(CXXFLAGS
) $< \
103 | sed
's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@
; \
104 [ -s
$@
] ||
rm -f
$@
106 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
107 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
109 compile
:: $(TTCN3_DIR
)/bin
/compiler
# $(TTCN3_COMPILER)
110 @if
[ -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
112 compile
:: $(TTCN3_MODULES
) $(ASN1_MODULES
)
113 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
117 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
118 $(GENERATED_SOURCES
) compile
$(DEPFILES
) \
121 dep
: $(GENERATED_SOURCES
) $(USER_SOURCES
) ;
123 ifeq ($(findstring n
,$(MAKEFLAGS
)),)
124 ifeq ($(filter clean distclean check compile archive diag
,$(MAKECMDGOALS
)),)
131 # Add your rules here if necessary...
133 run
: $(TARGET
) run
$(RT2_SUFFIX
).cfg
136 # don't write the log, it confuses Eclipse
139 rm -f compile
; $(MAKE
) run
141 run-rt2.cfg
: run.cfg Makefile
142 perl
-pwle
's/^(dual2)$$/$$1\ndualnegtest/' $< > $@
144 run-dynamic.cfg
: run.cfg
147 run-rt2-dynamic.cfg
: run-rt2.cfg
152 $(foreach src
, $(USER_SOURCES
), $(eval vpath
$(src
) $(ABS_SRC
)))