Sync with 5.4.2
[deliverable/titan.core.git] / regression_test / logger / emergency_logging / Makefile
CommitLineData
970ed795 1###############################################################################
3abe9331 2# Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
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###############################################################################
8TOPDIR := ../../
9include ${TOPDIR}/Makefile.regression
10
11#
12# Do NOT touch this line...
13#
14.PHONY: all archive check clean dep objects
15
16.SUFFIXES: .d
17
18#
19# Set these variables...
20#
21
22# The path of your TTCN-3 Test Executor installation:
23# Uncomment this line to override the environment variable.
24# TTCN3_DIR =
25
26# Your platform: (SOLARIS, SOLARIS8, LINUX, FREEBSD or WIN32)
27#PLATFORM = LINUX
28
29# Your C++ compiler:
30# (if you change the platform, you may need to change the compiler)
31CXX = g++
32
33# Flags for the C++ preprocessor (and makedepend as well):
34CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include
35
36# Flags for dependency generation
37CXXDEPFLAGS = -MM
38
39# Flags for the C++ compiler:
40CXXFLAGS = -Wall
41
42# Flags for the linker:
43LDFLAGS =
44
45ifeq ($(PLATFORM), WIN32)
46# Silence linker warnings.
47LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc
48endif
49
50# Flags for the TTCN-3 and ASN.1 compiler:
51COMPILER_FLAGS = -L
52
53# Execution mode: (either ttcn3 or ttcn3-parallel)
54TTCN3_LIB = ttcn3-parallel
55
56# The path of your OpenSSL installation:
57# If you do not have your own one, leave it unchanged.
58OPENSSL_DIR = $(TTCN3_DIR)
59
60# The path of your libxml2 installation:
61# If you do not have your own one, leave it unchanged.
62XMLDIR = $(TTCN3_DIR)
63
64# Directory to store the archived source files:
65ARCHIVE_DIR = backup
66
67#
68# You may change these variables. Add your files if necessary...
69#
70
71# TTCN-3 modules of this project:
72TTCN3_MODULES = EmergencyLoggingTest.ttcn Titan_LogTestDefinitions.ttcn Titan_LogTest.ttcn #Titan_LogControlTest.ttcn TitanLoggerControl.ttcn
73
74# ASN.1 modules of this project:
75ASN1_MODULES =
76
77# C++ source & header files generated from the TTCN-3 & ASN.1 modules of
78# this project:
79GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
80GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
81
82# C/C++ Source & header files of Test Ports, external functions and
83# other modules:
84USER_SOURCES = PCO_PT.cc
85USER_HEADERS = $(USER_SOURCES:.cc=.hh)
86
87# Object files of this project that are needed for the executable test suite:
88OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS)
89
90GENERATED_OBJECTS = $(GENERATED_SOURCES:.cc=.o)
91
92USER_OBJECTS = $(USER_SOURCES:.cc=.o)
93
94DEPFILES = $(USER_OBJECTS:.o=.d) $(GENERATED_OBJECTS:.o=.d)
95
96# Other files of the project (Makefile, configuration files, etc.)
97# that will be added to the archived source files:
98OTHER_FILES = Makefile
99
100# The name of the executable test suite:
101TARGET = EmergencyLogTest
102
103#
104# Do not modify these unless you know what you are doing...
105# Platform specific additional libraries:
106#
3f84031e 107SOLARIS_LIBS += -lsocket -lnsl -lxml2
108SOLARIS8_LIBS += -lsocket -lnsl -lxml2
109LINUX_LIBS += -lxml2
110FREEBSD_LIBS += -lxml2
111WIN32_LIBS += -lxml2
970ed795
EL
112
113#
114# Rules for building the executable...
115#
116
117all: $(TARGET) ;
118
119objects: $(OBJECTS) compile;
120
121$(TARGET): $(OBJECTS)
122 if $(CXX) $(LDFLAGS) -o $@ $^ \
123 -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
124 -L$(OPENSSL_DIR)/lib -lcrypto \
125 -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \
126 then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi
127
128.cc.o .c.o:
129 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
130
131.cc.d .c.d:
132 @echo Creating dependency file for '$<'; set -e; \
133 $(CXX) $(CXXDEPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $< \
134 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
135 [ -s $@ ] || rm -f $@
136
137$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
138 @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
139
140check: $(TTCN3_MODULES) $(ASN1_MODULES)
141 $(TTCN3_DIR)/bin/compiler -s $(COMPILER_FLAGS) $^
142
143compile: $(TTCN3_MODULES) $(ASN1_MODULES)
144 $(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) $^ - $?
145 touch $@
146
147clean distclean:
148 -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
149 $(GENERATED_SOURCES) compile $(DEPFILES) \
150 tags *c.log
151
152dep: $(GENERATED_SOURCES) $(USER_SOURCES) ;
153
154ifeq ($(findstring n,$(MAKEFLAGS)),)
155ifeq ($(filter clean check compile archive diag,$(MAKECMDGOALS)),)
156-include $(DEPFILES)
157endif
158endif
159
160archive:
161 mkdir -p $(ARCHIVE_DIR)
162 tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \
163 $(USER_HEADERS) $(USER_SOURCES) $(OTHER_FILES) \
164 | gzip >$(ARCHIVE_DIR)/`basename $(TARGET) .exe`-`date '+%y%m%d-%H%M'`.tgz
165
166diag:
167 $(TTCN3_DIR)/bin/compiler -v 2>&1
168 $(TTCN3_DIR)/bin/mctr_cli -v 2>&1
169 $(CXX) -v 2>&1
170 @echo TTCN3_DIR=$(TTCN3_DIR)
171 @echo OPENSSL_DIR=$(OPENSSL_DIR)
172 @echo XMLDIR=$(XMLDIR)
173 @echo PLATFORM=$(PLATFORM)
174
175#
176# Add your rules here if necessary...
177#
178run: $(TARGET)
179 ./EmergencyLogTest.sh
180
This page took 0.030383 seconds and 5 git commands to generate.