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