Commit | Line | Data |
---|---|---|
d44e3c4f | 1 | ############################################################################## |
2 | # Copyright (c) 2000-2016 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 | |
d44e3c4f | 7 | # |
8 | # Contributors: | |
9 | # | |
10 | # Balasko, Jeno | |
11 | # Delic, Adam | |
12 | # Hanko, Matyas | |
13 | # Kovacs, Ferenc | |
14 | # Lovassy, Arpad | |
15 | # Ormandi, Matyas | |
16 | # Raduly, Csaba | |
17 | # Szabados, Kristof | |
18 | # Szabo, Janos Zoltan – initial implementation | |
19 | # | |
20 | ############################################################################## | |
970ed795 EL |
21 | # uncomment this line to use alternative runtime (TITAN_RUNTIME_2) |
22 | # RT2 = yes | |
23 | ||
24 | # This Makefile was generated by the compiler | |
25 | # of the TTCN-3 Test Executor version 1.4.pl5 | |
26 | # for Matyas Hanko (ethmhk@duna61) on Mon Oct 6 16:26:18 2003 | |
27 | ||
28 | # The following make commands are available: | |
29 | # - make, make all Builds the executable test suite. | |
30 | # - make compile Translates TTCN-3 and ASN.1 modules to C++. | |
31 | # - make clean Removes all generated files. | |
32 | # - make dep Creates/updates dependency list. | |
33 | # - make archive Archives all source files. | |
34 | ||
35 | # | |
36 | # Set these variables... | |
37 | # | |
38 | ||
3abe9331 | 39 | TOP := ../../ |
40 | include $(TOP)/Makefile.cfg | |
41 | ||
42 | ||
970ed795 EL |
43 | # The path of your TTCN-3 Test Executor installation: |
44 | # Uncomment this line to override the environment variable. | |
45 | # TTCN3_DIR = | |
46 | ||
47 | # Your platform: (SOLARIS, LINUX, FREEBSD or WIN32) | |
48 | ifndef PLATFORM | |
49 | PLATFORM = SOLARIS | |
50 | endif | |
51 | ||
52 | # Your C++ compiler: | |
01fb194f | 53 | #CXX = g++ |
970ed795 | 54 | |
970ed795 EL |
55 | # Flags for the C++ preprocessor (and makedepend as well): |
56 | CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include -I$(XMLDIR)/include/libxml2 | |
57 | ifdef RT2 | |
58 | CPPFLAGS += -DTITAN_RUNTIME_2 | |
59 | endif | |
60 | ||
61 | # Flags for the C++ compiler: | |
62 | CXXFLAGS = -Wall | |
63 | ||
64 | # Flags for the linker: | |
65 | LDFLAGS = | |
66 | ||
67 | # Flags for the TTCN-3 and ASN.1 compiler: | |
68 | COMPILER_FLAGS = -L | |
69 | ifdef RT2 | |
70 | COMPILER_FLAGS += -R | |
71 | endif | |
72 | ||
73 | # Execution mode: (either ttcn3 or ttcn3-parallel) | |
74 | ifndef RT2 | |
75 | TTCN3_LIB = ttcn3 | |
76 | else | |
77 | TTCN3_LIB = ttcn3-rt2 | |
78 | endif | |
79 | ||
80 | ||
81 | # The path of your OpenSSL installation: | |
82 | # If you do not have your own one, leave it unchanged. | |
83 | OPENSSL_DIR = $(TTCN3_DIR) | |
84 | ||
85 | # Directory to store the archived source files: | |
86 | # Note: you can set any directory except ./archive | |
87 | ARCHIVE_DIR = ./backup | |
88 | ||
89 | # | |
90 | # You may change these variables. Add your files if necessary... | |
91 | # | |
92 | ||
93 | # The TTCN-3 modules needed for this project: | |
94 | TTCN3_MODULES = Temp.ttcn | |
95 | ||
96 | # The ASN.1 modules needed for this project: | |
97 | ASN1_MODULES = TempA.asn | |
98 | ||
99 | # C++ source & header files generated by TTCN-3 & ASN.1 compilers: | |
100 | GENERATED_SOURCES = Temp.cc TempA.cc | |
101 | GENERATED_HEADERS = Temp.hh TempA.hh | |
102 | ||
103 | # Source & header files of Test Ports and your other modules: | |
104 | USER_SOURCES = | |
105 | USER_HEADERS = | |
106 | ||
107 | # All object files needed for the executable test suite: | |
108 | OBJECTS = Temp.o TempA.o | |
109 | ||
110 | # The name of the executable test suite: | |
111 | TARGET = Temp | |
112 | ||
113 | ifdef COVERAGE | |
3abe9331 | 114 | CPPFLAGS += -fprofile-arcs -ftest-coverage -g |
970ed795 EL |
115 | CXXFLAGS += -fprofile-arcs -ftest-coverage -g |
116 | LDFLAGS += -fprofile-arcs -ftest-coverage -g -lgcov | |
117 | endif | |
118 | ||
119 | # | |
120 | # Do not modify these unless you know what you are doing... | |
121 | # | |
f08ff9ca BB |
122 | SOLARIS_LIBS = -lxnet -L$(XMLDIR)/lib -lxml2 -lresolv -lcurses |
123 | SOLARIS8_LIBS = -lxnet -L$(XMLDIR)/lib -lxml2 -lresolv -lnsl -lsocket -lcurses | |
124 | LINUX_LIBS = -L$(XMLDIR)/lib -lxml2 -lpthread -lrt -lncurses | |
125 | FREEBSD_LIBS = -L$(XMLDIR)/lib -lxml2 -lncurses | |
126 | WIN32_LIBS = -L$(XMLDIR)/lib -lxml2 -lncurses | |
970ed795 EL |
127 | |
128 | # | |
129 | # Rules for building the executable... | |
130 | # | |
131 | all: $(TARGET) ; | |
132 | ||
133 | $(TARGET): $(OBJECTS) | |
134 | $(CXX) $(LDFLAGS) -o $@ $(OBJECTS) -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \ | |
135 | -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS) | |
136 | ||
137 | .cc.o .c.o: | |
138 | $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< | |
139 | ||
140 | $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile | |
141 | @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi | |
142 | ||
143 | compile: $(TTCN3_MODULES) $(ASN1_MODULES) | |
144 | $(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) $(TTCN3_MODULES) \ | |
145 | $(ASN1_MODULES) - $? | |
146 | touch $@ | |
147 | ||
148 | clean: | |
149 | -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \ | |
150 | $(GENERATED_SOURCES) compile *.log *.gcda *.gcno | |
151 | ||
152 | dep: $(GENERATED_SOURCES) | |
153 | makedepend $(CPPFLAGS) $(USER_SOURCES) $(GENERATED_SOURCES) | |
154 | ||
155 | archive: | |
156 | mkdir -p $(ARCHIVE_DIR) | |
157 | tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \ | |
158 | $(USER_HEADERS) $(USER_SOURCES) Makefile \ | |
159 | | gzip >$(ARCHIVE_DIR)/$(TARGET)-`date '+%y%m%d-%H%M'`.tgz | |
160 |