Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / XML / HQ30408 / 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 the C++ preprocessor (and makedepend as well):
26#CPPFLAGS +=
27
28# Flags for dependency generation
29CXXDEPFLAGS = -MM
30
31# Flags for the C++ compiler:
32CXXFLAGS += -Wall
33
34# Flags for the linker:
35#LDFLAGS +=
36
37# Flags for the TTCN-3 and ASN.1 compiler:
38#COMPILER_FLAGS +=
39
40# Execution mode: (either ttcn3 or ttcn3-parallel)
41TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
42
43#
44# You may change these variables. Add your files if necessary...
45#
46
47# TTCN-3 modules of this project:
48TTCN3_MODULES = HQ30408.ttcn
49
50# ASN.1 modules of this project:
51ASN1_MODULES =
52
53# C++ source & header files generated from the TTCN-3 & ASN.1 modules of
54# this project:
55GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
56GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
57
58# C/C++ Source & header files of Test Ports, external functions and
59# other modules:
60USER_SOURCES =
61USER_HEADERS = $(USER_SOURCES:.cc=.hh)
62
63# Object files of this project that are needed for the executable test suite:
64OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
65
66GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
67
68USER_OBJECTS = $(USER_SOURCES:.cc=.o)
69
70DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
71
72# Other files of the project (Makefile, configuration files, etc.)
73# that will be added to the archived source files:
74OTHER_FILES = Makefile
75
76# The name of the executable test suite:
77TARGET = HQ30408
78
79#
80# Rules for building the executable...
81#
82
83all: $(TARGET) ;
84
85objects: $(OBJECTS) compile;
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
106compile: $(TTCN3_MODULES) $(ASN1_MODULES)
107 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
108 touch $@
109
110clean distclean:
111 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
112 $(GENERATED_SOURCES) compile $(DEPFILES) \
113 tags *.log
114
115dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
116
117ifeq ($(findstring n,$(MAKEFLAGS)),)
118ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
119-include $(DEPFILES)
120endif
121endif
122
123diag:
124 $(TTCN3_COMPILER) -v 2>&1
125 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
126 $(CXX) -v 2>&1
127 @echo TTCN3_DIR=$(TTCN3_DIR)
128 @echo OPENSSL_DIR=$(OPENSSL_DIR)
129 @echo XMLDIR=$(XMLDIR)
130 @echo PLATFORM=$(PLATFORM)
131
132#
133# Add your rules here if necessary...
134#
135
136run: $(TARGET)
137 ./$^
138
This page took 0.028862 seconds and 5 git commands to generate.