Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame^] | 1 | # This Makefile was generated by the Makefile Generator |
| 2 | # of the TTCN-3 Test Executor version CRL 113 200/6 R1A |
| 3 | # for Elemer Lelik (ethlel@esekilxxen1846) on Wed Apr 12 09:00:44 2017 |
| 4 | |
| 5 | # Copyright (c) 2000-2017 Ericsson Telecom AB |
| 6 | |
| 7 | # The following make commands are available: |
| 8 | # - make, make all Builds the executable test suite. |
| 9 | # - make archive Archives all source files. |
| 10 | # - make check Checks the semantics of TTCN-3 and ASN.1modules. |
| 11 | # - make port Generates port skeletons. |
| 12 | # - make clean Removes all generated files. |
| 13 | # - make compile Translates TTCN-3 and ASN.1 modules to C++. |
| 14 | # - make dep Creates/updates dependency list. |
| 15 | # - make executable Builds the executable test suite. |
| 16 | # - make library Builds the library archive. |
| 17 | # - make objects Builds the object files without linking the executable. |
| 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) |
| 31 | CXX = g++ |
| 32 | |
| 33 | # Flags for the C++ preprocessor (and makedepend as well): |
| 34 | CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include |
| 35 | |
| 36 | # Flags for the C++ compiler: |
| 37 | CXXFLAGS = -Wall |
| 38 | |
| 39 | # Flags for the linker: |
| 40 | LDFLAGS = |
| 41 | |
| 42 | ifeq ($(PLATFORM), WIN32) |
| 43 | # Silence linker warnings. |
| 44 | LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc |
| 45 | endif |
| 46 | |
| 47 | # Utility to create library files |
| 48 | AR = ar |
| 49 | ARFLAGS = |
| 50 | |
| 51 | # Flags for the TTCN-3 and ASN.1 compiler: |
| 52 | COMPILER_FLAGS = -L |
| 53 | |
| 54 | # Execution mode: (either ttcn3 or ttcn3-parallel) |
| 55 | TTCN3_LIB = ttcn3-parallel |
| 56 | |
| 57 | # The path of your OpenSSL installation: |
| 58 | # If you do not have your own one, leave it unchanged. |
| 59 | OPENSSL_DIR = $(TTCN3_DIR) |
| 60 | |
| 61 | # The path of your libxml2 installation: |
| 62 | # If you do not have your own one, leave it unchanged. |
| 63 | XMLDIR = $(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 | # TTCN-3 modules of this project: |
| 74 | TTCN3_MODULES = General_Types.ttcn M3UA_Emulation.ttcn M3UA_Types.ttcn MTP3asp_PortType.ttcn MTP3asp_Types.ttcn SCCP_Emulation.ttcn SCCP_Mapping.ttcn SCCP_Testcases.ttcn SCCP_Types.ttcn SCCPasp_Types.ttcn SCTPasp_PortType.ttcn SCTPasp_Types.ttcn |
| 75 | |
| 76 | # ASN.1 modules of this project: |
| 77 | ASN1_MODULES = |
| 78 | |
| 79 | # C++ source & header files generated from the TTCN-3 & ASN.1 modules of |
| 80 | # this project: |
| 81 | GENERATED_SOURCES = General_Types.cc M3UA_Emulation.cc M3UA_Types.cc MTP3asp_PortType.cc MTP3asp_Types.cc SCCP_Emulation.cc SCCP_Mapping.cc SCCP_Testcases.cc SCCP_Types.cc SCCPasp_Types.cc SCTPasp_PortType.cc SCTPasp_Types.cc |
| 82 | GENERATED_HEADERS = General_Types.hh M3UA_Emulation.hh M3UA_Types.hh MTP3asp_PortType.hh MTP3asp_Types.hh SCCP_Emulation.hh SCCP_Mapping.hh SCCP_Testcases.hh SCCP_Types.hh SCCPasp_Types.hh SCTPasp_PortType.hh SCTPasp_Types.hh |
| 83 | |
| 84 | # C/C++ Source & header files of Test Ports, external functions and |
| 85 | # other modules: |
| 86 | USER_SOURCES = SCTPasp_PT.cc |
| 87 | USER_HEADERS = SCTPasp_PT.hh |
| 88 | |
| 89 | # Object files of this project that are needed for the executable test suite: |
| 90 | OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS) |
| 91 | |
| 92 | GENERATED_OBJECTS = General_Types.o M3UA_Emulation.o M3UA_Types.o MTP3asp_PortType.o MTP3asp_Types.o SCCP_Emulation.o SCCP_Mapping.o SCCP_Testcases.o SCCP_Types.o SCCPasp_Types.o SCTPasp_PortType.o SCTPasp_Types.o |
| 93 | |
| 94 | USER_OBJECTS = SCTPasp_PT.o |
| 95 | |
| 96 | # Other files of the project (Makefile, configuration files, etc.) |
| 97 | # that will be added to the archived source files: |
| 98 | OTHER_FILES = Makefile |
| 99 | |
| 100 | # The name of the executable test suite: |
| 101 | EXECUTABLE = SCCP_Test |
| 102 | |
| 103 | |
| 104 | |
| 105 | LIBRARY = lib$(EXECUTABLE).a |
| 106 | |
| 107 | TARGET = $(EXECUTABLE) |
| 108 | |
| 109 | # |
| 110 | # Do not modify these unless you know what you are doing... |
| 111 | # Platform specific additional libraries: |
| 112 | # |
| 113 | SOLARIS_LIBS = -lsocket -lnsl -lxml2 -lresolv |
| 114 | SOLARIS8_LIBS = -lsocket -lnsl -lxml2 -lresolv |
| 115 | LINUX_LIBS = -lxml2 -lpthread -lrt |
| 116 | FREEBSD_LIBS = -lxml2 |
| 117 | WIN32_LIBS = -lxml2 |
| 118 | |
| 119 | # |
| 120 | # Rules for building the executable... |
| 121 | # |
| 122 | |
| 123 | all: $(TARGET) ; |
| 124 | |
| 125 | executable: $(EXECUTABLE) ; |
| 126 | |
| 127 | library: $(LIBRARY) ; |
| 128 | |
| 129 | objects: $(OBJECTS) compile; |
| 130 | |
| 131 | $(EXECUTABLE): $(OBJECTS) |
| 132 | if $(CXX) $(LDFLAGS) -o $@ $(OBJECTS) \ |
| 133 | -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \ |
| 134 | -L$(OPENSSL_DIR)/lib -lcrypto \ |
| 135 | -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \ |
| 136 | then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi |
| 137 | |
| 138 | $(LIBRARY): $(OBJECTS) |
| 139 | $(AR) -r $(ARFLAGS) $(LIBRARY) $(OBJECTS) |
| 140 | |
| 141 | %.o: %.c $(GENERATED_HEADERS) |
| 142 | $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< |
| 143 | |
| 144 | %.o: %.cc $(GENERATED_HEADERS) |
| 145 | $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< |
| 146 | |
| 147 | $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile |
| 148 | @if [ ! -f $@ ]; then rm -f compile; $(MAKE) compile; fi |
| 149 | |
| 150 | check: $(TTCN3_MODULES) $(ASN1_MODULES) |
| 151 | $(TTCN3_DIR)/bin/compiler -s $(COMPILER_FLAGS) \ |
| 152 | $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES) |
| 153 | |
| 154 | port: $(TTCN3_MODULES) $(ASN1_MODULES) |
| 155 | $(TTCN3_DIR)/bin/compiler -t $(COMPILER_FLAGS) \ |
| 156 | $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES) |
| 157 | |
| 158 | compile: $(TTCN3_MODULES) $(ASN1_MODULES) |
| 159 | $(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) \ |
| 160 | $(TTCN3_MODULES) $(ASN1_MODULES) - $? |
| 161 | touch $@ |
| 162 | |
| 163 | clean: |
| 164 | -rm -f $(EXECUTABLE) $(LIBRARY) $(OBJECTS) $(GENERATED_HEADERS) \ |
| 165 | $(GENERATED_SOURCES) compile \ |
| 166 | tags *.log |
| 167 | |
| 168 | dep: $(GENERATED_SOURCES) $(USER_SOURCES) ; |
| 169 | makedepend $(CPPFLAGS) -DMAKEDEPEND_RUN $(GENERATED_SOURCES) $(USER_SOURCES) |
| 170 | |
| 171 | archive: |
| 172 | mkdir -p $(ARCHIVE_DIR) |
| 173 | tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \ |
| 174 | $(USER_HEADERS) $(USER_SOURCES) $(OTHER_FILES) \ |
| 175 | | gzip >$(ARCHIVE_DIR)/`basename $(TARGET) .exe`-`date '+%y%m%d-%H%M'`.tgz |
| 176 | |
| 177 | diag: |
| 178 | $(TTCN3_DIR)/bin/compiler -v 2>&1 |
| 179 | $(TTCN3_DIR)/bin/mctr_cli -v 2>&1 |
| 180 | $(CXX) -v 2>&1 |
| 181 | $(AR) -V 2>&1 |
| 182 | @echo TTCN3_DIR=$(TTCN3_DIR) |
| 183 | @echo OPENSSL_DIR=$(OPENSSL_DIR) |
| 184 | @echo XMLDIR=$(XMLDIR) |
| 185 | @echo PLATFORM=$(PLATFORM) |
| 186 | |
| 187 | # |
| 188 | # Add your rules here if necessary... |
| 189 | # |
| 190 | |