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