72bce473629f8a0a9f78d0bb3c950ea6fba597f9
[deliverable/titan.core.git] / regression_test / RAW / HN25015 / Makefile
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
7 #
8 # Contributors:
9 # Baji, Laszlo
10 # Balasko, Jeno
11 # Raduly, Csaba
12 #
13 ##############################################################################
14 TOPDIR := ../..
15 include ../../Makefile.regression
16
17 # WARNING! This Makefile can be used with GNU make only.
18 # Other versions of make may report syntax errors in it.
19
20 #
21 # Do NOT touch this line...
22 #
23 .PHONY: all archive check clean dep objects
24
25 .SUFFIXES: .d
26
27 #
28 # Set these variables...
29 #
30
31 # Flags for dependency generation
32 CXXDEPFLAGS = -MM
33
34 ifeq ($(PLATFORM), WIN32)
35 # Silence linker warnings.
36 # Overridden by Makefile.cfg
37 endif
38
39 # Flags for the TTCN-3 and ASN.1 compiler:
40 COMPILER_FLAGS += -x
41
42 # Execution mode: (either ttcn3 or ttcn3-parallel)
43 TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
44
45
46 #
47 # You may change these variables. Add your files if necessary...
48 #
49
50 # TTCN-3 modules of this project:
51 TTCN3_MODULES = General_Types.ttcn SGsAP_Types.ttcn HN25015.ttcn
52
53 # ASN.1 modules of this project:
54 ASN1_MODULES =
55
56 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
57 # this project:
58 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
59 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
60
61 # C/C++ Source & header files of Test Ports, external functions and
62 # other modules:
63 USER_SOURCES =
64 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
65
66 # Object files of this project that are needed for the executable test suite:
67 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
68
69 GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
70
71 USER_OBJECTS = $(USER_SOURCES:.cc=.o)
72
73 DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
74
75
76 # The name of the executable test suite:
77 TARGET = HN25015$(RT2_SUFFIX)$(EXESUFFIX)
78
79
80 # Rules for building the executable...
81 #
82
83 all: $(TARGET) ;
84
85 objects: $(OBJECTS) ;
86
87 $(TARGET): $(OBJECTS)
88 if $(CXX) $(LDFLAGS) -o $@ $^ \
89 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
90 -L$(OPENSSL_DIR)/lib -lcrypto \
91 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
92 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
93
94 .cc.o .c.o:
95 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
96
97 .cc.d .c.d:
98 @echo Creating dependency file for '$<'; set -e; \
99 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
100 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
101 [ -s $@ ] || rm -f $@
102
103 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
104 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
105
106 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
107 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
108 touch $@
109
110
111 clean:
112 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
113 $(GENERATED_SOURCES) compile $(DEPFILES) \
114 tags *.log
115
116 distclean: clean
117 -$(RM) $(DEPFILES)
118
119
120 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
121
122 ifeq ($(findstring n,$(MAKEFLAGS)),)
123 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
124 -include $(DEPFILES)
125 endif
126 endif
127
128
129
130 diag:
131 $(TTCN3_COMPILER) -v 2>&1
132 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
133 $(CXX) -v 2>&1
134 @echo TTCN3_DIR=$(TTCN3_DIR)
135 @echo OPENSSL_DIR=$(OPENSSL_DIR)
136 @echo XMLDIR=$(XMLDIR)
137 @echo PLATFORM=$(PLATFORM)
138
139 #
140 # Add your rules here if necessary...
141 #
142
143 run: $(TARGET) ./config.cfg
144 ./$^
This page took 0.033474 seconds and 4 git commands to generate.