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