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