1bd8b830fa4a44718e049c17624231dc890c8a2c
[deliverable/titan.core.git] / regression_test / XML / AbstractBlock / 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 # Balasko, Jeno
10 # Baranyi, Botond
11 #
12 ##############################################################################
13 TOPDIR = ../..
14 include ../../Makefile.regression
15
16 # WARNING! This Makefile can be used with GNU make only.
17 # Other versions of make may report syntax errors in it.
18
19 #
20 # Do NOT touch this line...
21 #
22 .PHONY: all archive check clean dep objects
23
24 .SUFFIXES: .d
25
26 #
27 # Set these variables...
28 #
29
30 # Flags for the C++ preprocessor (and makedepend as well):
31 #CPPFLAGS +=
32
33 # Flags for dependency generation
34 CXXDEPFLAGS = -MM
35
36 # Flags for the C++ compiler:
37 CXXFLAGS += -Wall
38
39 # Flags for the linker:
40 #LDFLAGS +=
41
42 # Flags for the TTCN-3 and ASN.1 compiler:
43 #COMPILER_FLAGS +=
44
45 # Execution mode: (either ttcn3 or ttcn3-parallel)
46 TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
47
48 #
49 # You may change these variables. Add your files if necessary...
50 #
51
52 # TTCN-3 modules of this project:
53 TTCN3_MODULES = AbstractBlock.ttcn
54
55 # ASN.1 modules of this project:
56 ASN1_MODULES =
57
58 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
59 # this project:
60 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
61 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
62
63 # C/C++ Source & header files of Test Ports, external functions and
64 # other modules:
65 USER_SOURCES =
66 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
67
68 # Object files of this project that are needed for the executable test suite:
69 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
70
71 GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
72
73 USER_OBJECTS = $(USER_SOURCES:.cc=.o)
74
75 DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
76
77 # Other files of the project (Makefile, configuration files, etc.)
78 # that will be added to the archived source files:
79 OTHER_FILES = Makefile
80
81 # The name of the executable test suite:
82 TARGET = AbstractBlock
83
84 #
85 # Rules for building the executable...
86 #
87
88 all: $(TARGET) ;
89
90 objects: $(OBJECTS) compile;
91
92 $(TARGET): $(OBJECTS)
93 if $(CXX) $(LDFLAGS) -o $@ $^ \
94 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
95 -L$(OPENSSL_DIR)/lib -lcrypto \
96 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
97 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
98
99 .cc.o .c.o:
100 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
101
102 .cc.d .c.d:
103 @echo Creating dependency file for '$<'; set -e; \
104 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
105 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
106 [ -s $@ ] || rm -f $@
107
108 $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
109 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
110
111 compile: $(TTCN3_MODULES) $(ASN1_MODULES)
112 $(TTCN3_COMPILER) $(COMPILER_FLAGS) $^ - $?
113 touch $@
114
115 clean distclean:
116 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
117 $(GENERATED_SOURCES) compile $(DEPFILES) \
118 tags *.log
119
120 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
121
122 ifeq ($(findstring n,$(MAKEFLAGS)),)
123 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
124 -include $(DEPFILES)
125 endif
126 endif
127
128 diag:
129 $(TTCN3_COMPILER) -v 2>&1
130 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
131 $(CXX) -v 2>&1
132 @echo TTCN3_DIR=$(TTCN3_DIR)
133 @echo OPENSSL_DIR=$(OPENSSL_DIR)
134 @echo XMLDIR=$(XMLDIR)
135 @echo PLATFORM=$(PLATFORM)
136
137 #
138 # Add your rules here if necessary...
139 #
140
141 run: $(TARGET)
142 ./$^
143
This page took 0.032361 seconds and 4 git commands to generate.