Last sync 2016.04.01
[deliverable/titan.core.git] / regression_test / RAW / ustr / 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 # Botond Baranyi – initial implementation
10 #
11 ##############################################################################
12 TOPDIR := ../..
13 include ../../Makefile.regression
14
15 # WARNING! This Makefile can be used with GNU make only.
16 # Other versions of make may report syntax errors in it.
17
18 #
19 # Do NOT touch this line...
20 #
21 .PHONY: all archive check clean dep objects
22
23 .SUFFIXES: .d
24
25 # Flags for the C++ preprocessor (and makedepend as well):
26 #CPPFLAGS +=
27
28 # Flags for dependency generation
29 CXXDEPFLAGS = -MM
30
31 # Flags for the C++ compiler:
32 #CXXFLAGS +=
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)
41 TTCN3_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:
48 TTCN3_MODULES = ustr.ttcn
49
50 # ASN.1 modules of this project:
51 ASN1_MODULES =
52
53 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
54 # this project:
55 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
56 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
57
58 # C/C++ Source & header files of Test Ports, external functions and
59 # other modules:
60 USER_SOURCES =
61 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
62
63 # Object files of this project that are needed for the executable test suite:
64 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
65
66 GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
67
68 USER_OBJECTS = $(USER_SOURCES:.cc=.o)
69
70 DEPFILES = $(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:
74 OTHER_FILES = Makefile
75
76 # The name of the executable test suite:
77 TARGET = ustr$(EXESUFFIX)
78
79
80 #
81 # Rules for building the executable...
82 #
83
84 all: $(TARGET) ;
85
86 objects: $(OBJECTS) compile;
87
88 $(TARGET): $(OBJECTS)
89 if $(CXX) $(LDFLAGS) -o $@ $^ \
90 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
91 -L$(OPENSSL_DIR)/lib -lcrypto \
92 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
93 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
94
95 .cc.o .c.o:
96 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
97
98 .cc.d .c.d:
99 @echo Creating dependency file for '$<'; set -e; \
100 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
101 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
102 [ -s $@ ] || rm -f $@
103
104 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
105 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
106
107 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
108 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
109 touch $@
110
111 clean distclean:
112 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
113 $(GENERATED_SOURCES) compile $(DEPFILES) \
114 tags *.log
115
116 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
117
118 ifeq ($(findstring n,$(MAKEFLAGS)),)
119 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
120 -include $(DEPFILES)
121 endif
122 endif
123
124 diag:
125 $(TTCN3_DIR)/bin/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)
138 ./$^
139
This page took 0.032764 seconds and 6 git commands to generate.