Merge github.com:eclipse/titan.core
[deliverable/titan.core.git] / regression_test / RAW / HS16977 / 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 # Baranyi, Botond
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 # Flags for the C++ preprocessor (and makedepend as well):
28 #CPPFLAGS +=
29
30 # Flags for dependency generation
31 CXXDEPFLAGS = -MM
32
33 # Flags for the C++ compiler:
34 #CXXFLAGS +=
35
36 # Flags for the linker:
37 #LDFLAGS +=
38
39 # Flags for the TTCN-3 and ASN.1 compiler:
40 #COMPILER_FLAGS +=
41
42 # Execution mode: (either ttcn3 or ttcn3-parallel)
43 TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
44
45 #
46 # You may change these variables. Add your files if necessary...
47 #
48
49 # TTCN-3 modules of this project:
50 TTCN3_MODULES = $(wildcard HS16977*.ttcn)
51
52 # ASN.1 modules of this project:
53 ASN1_MODULES =
54
55 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
56 # this project:
57 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
58 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
59
60 # C/C++ Source & header files of Test Ports, external functions and
61 # other modules:
62 USER_SOURCES =
63 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
64
65 # Object files of this project that are needed for the executable test suite:
66 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
67
68 GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
69
70 USER_OBJECTS = $(USER_SOURCES:.cc=.o)
71
72 DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
73
74 # Other files of the project (Makefile, configuration files, etc.)
75 # that will be added to the archived source files:
76 OTHER_FILES = Makefile
77
78 # The name of the executable test suite:
79 TARGET = HS16977$(EXESUFFIX)
80
81
82 #
83 # Rules for building the executable...
84 #
85
86 all: $(TARGET) ;
87
88 objects: $(OBJECTS) compile;
89
90 $(TARGET): $(OBJECTS)
91 if $(CXX) $(LDFLAGS) -o $@ $^ \
92 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
93 -L$(OPENSSL_DIR)/lib -lcrypto \
94 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
95 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
96
97 .cc.o .c.o:
98 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
99
100 .cc.d .c.d:
101 @echo Creating dependency file for '$<'; set -e; \
102 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
103 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
104 [ -s $@ ] || rm -f $@
105
106 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
107 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
108
109 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
110 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
111 touch $@
112
113 clean distclean:
114 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
115 $(GENERATED_SOURCES) compile $(DEPFILES) \
116 tags *.log
117
118 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
119
120 ifeq ($(findstring n,$(MAKEFLAGS)),)
121 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
122 -include $(DEPFILES)
123 endif
124 endif
125
126 diag:
127 $(TTCN3_DIR)/bin/compiler -v 2>&1
128 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
129 $(CXX) -v 2>&1
130 @echo TTCN3_DIR=$(TTCN3_DIR)
131 @echo OPENSSL_DIR=$(OPENSSL_DIR)
132 @echo XMLDIR=$(XMLDIR)
133 @echo PLATFORM=$(PLATFORM)
134
135 #
136 # Add your rules here if necessary...
137 #
138
139 run: $(TARGET)
140 ./$^
141
This page took 0.043517 seconds and 6 git commands to generate.