Sync with 5.4.1
[deliverable/titan.core.git] / regression_test / XML / AbstractBlock / 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 #
22 # Set these variables...
23 #
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 += -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)
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 = AbstractBlock.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 = AbstractBlock
78
79 #
80 # Rules for building the executable...
81 #
82
83 all: $(TARGET) ;
84
85 objects: $(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
106 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
107 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
108 touch $@
109
110 clean distclean:
111 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
112 $(GENERATED_SOURCES) compile $(DEPFILES) \
113 tags *.log
114
115 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
116
117 ifeq ($(findstring n,$(MAKEFLAGS)),)
118 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
119 -include $(DEPFILES)
120 endif
121 endif
122
123 diag:
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
136 run: $(TARGET)
137 ./$^
138
This page took 0.033652 seconds and 5 git commands to generate.