Titan Core Initial Contribution
[deliverable/titan.core.git] / regression_test / RAW / HN25015 / Makefile
1 ###############################################################################
2 # Copyright (c) 2000-2014 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 #
22 # Set these variables...
23 #
24
25 # Flags for dependency generation
26 CXXDEPFLAGS = -MM
27
28 ifeq ($(PLATFORM), WIN32)
29 # Silence linker warnings.
30 # Overridden by Makefile.cfg
31 endif
32
33 # Flags for the TTCN-3 and ASN.1 compiler:
34 COMPILER_FLAGS += -x
35
36 # Execution mode: (either ttcn3 or ttcn3-parallel)
37 TTCN3_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:
45 TTCN3_MODULES = General_Types.ttcn SGsAP_Types.ttcn HN25015.ttcn
46
47 # ASN.1 modules of this project:
48 ASN1_MODULES =
49
50 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
51 # this project:
52 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
53 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
54
55 # C/C++ Source & header files of Test Ports, external functions and
56 # other modules:
57 USER_SOURCES =
58 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
59
60 # Object files of this project that are needed for the executable test suite:
61 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
62
63 GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
64
65 USER_OBJECTS = $(USER_SOURCES:.cc=.o)
66
67 DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
68
69
70 # The name of the executable test suite:
71 TARGET = HN25015$(RT2_SUFFIX)$(EXESUFFIX)
72
73
74 # Rules for building the executable...
75 #
76
77 all: $(TARGET) ;
78
79 objects: $(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
100 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
101 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
102 touch $@
103
104
105 clean:
106 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
107 $(GENERATED_SOURCES) compile $(DEPFILES) \
108 tags *.log
109
110 distclean: clean
111 -$(RM) $(DEPFILES)
112
113
114 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
115
116 ifeq ($(findstring n,$(MAKEFLAGS)),)
117 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
118 -include $(DEPFILES)
119 endif
120 endif
121
122
123
124 diag:
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
137 run: $(TARGET) ./config.cfg
138 ./$^
This page took 0.075635 seconds and 5 git commands to generate.