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