a892b09fdccf176e83b996622f156c3525383e46
[deliverable/titan.core.git] / regression_test / implicitOmit / 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 distclean dep objects
18
19 .SUFFIXES: .d
20
21 #
22 # Set these variables...
23 #
24
25 # Flags for dependency generation
26 CXXDEPFLAGS = -MM
27
28 #COMPILER_FLAGS +=
29
30 # Execution mode: (either ttcn3 or ttcn3-parallel)
31 TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
32
33 #
34 # You may change these variables. Add your files if necessary...
35 #
36
37 # TTCN-3 modules of this project:
38 TTCN3_MODULES = io.ttcn
39
40 # ASN.1 modules of this project:
41 ASN1_MODULES =
42
43 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
44 # this project:
45 GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
46 GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
47
48 # C/C++ Source & header files of Test Ports, external functions and
49 # other modules:
50 USER_SOURCES =
51 USER_HEADERS = $(USER_SOURCES:.cc=.hh)
52
53 # Object files of this project that are needed for the executable test suite:
54 OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
55
56 GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
57
58 USER_OBJECTS = $(USER_SOURCES:.cc=.o)
59
60 DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
61
62 # Other files of the project (Makefile, configuration files, etc.)
63 # that will be added to the archived source files:
64 OTHER_FILES = Makefile
65
66 # The name of the executable test suite:
67 TARGET = io
68
69 #
70 # Do not modify these unless you know what you are doing...
71 # Platform specific additional libraries:
72 #
73 SOLARIS_LIBS += -lsocket -lnsl -lxml2
74 SOLARIS8_LIBS += -lsocket -lnsl -lxml2
75 LINUX_LIBS += -lxml2
76 FREEBSD_LIBS += -lxml2
77 WIN32_LIBS += -lxml2
78
79 #
80 # Rules for building the executable...
81 #
82
83 all: $(TARGET) ;
84
85 objects: $(OBJECTS) ;
86
87 $(TARGET): $(OBJECTS)
88 $(CXX) $(LDFLAGS) -o $@ $^ \
89 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
90 -L$(OPENSSL_DIR)/lib -lcrypto \
91 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS) \
92 || $(TTCN3_DIR)/bin/titanver $(OBJECTS)
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:
111 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
112 $(GENERATED_SOURCES) compile $(DEPFILES) \
113 tags *.log
114
115 distclean: clean
116 $(RM) $(DEPFILES)
117
118 dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
119
120 ifeq ($(findstring n,$(MAKEFLAGS)),)
121 ifeq ($(filter clean distclean check compile archive diag,$(MAKECMDGOALS)),)
122 -include $(DEPFILES)
123 endif
124 endif
125
126 diag:
127 $(TTCN3_DIR)/bin/compiler -v 2>&1
128 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
129 $(CXX) -v 2>&1
130 @echo TTCN3_DIR=$(TTCN3_DIR)
131 @echo OPENSSL_DIR=$(OPENSSL_DIR)
132 @echo XMLDIR=$(XMLDIR)
133 @echo PLATFORM=$(PLATFORM)
134
135 #
136 # Add your rules here if necessary...
137 #
138
139 run: $(TARGET) config.cfg
140 ./$^
141
This page took 0.031837 seconds and 5 git commands to generate.