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 |
Harald Welte | 0872b68 | 2017-04-12 12:17:55 +0200 | [diff] [blame] | 3 | # for Harald Welte (laforge@nataraja) on Wed Apr 12 11:16:09 2017 |
Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame] | 4 | |
Harald Welte | 0872b68 | 2017-04-12 12:17:55 +0200 | [diff] [blame] | 5 | # Copyright (c) 2000-2016 Ericsson Telecom AB |
Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame] | 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. |
Harald Welte | 0872b68 | 2017-04-12 12:17:55 +0200 | [diff] [blame] | 24 | # The value below points to the location of the TITAN version |
| 25 | # that generated this makefile. |
| 26 | TTCN3_DIR = /usr |
Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame] | 27 | |
| 28 | # Your platform: (SOLARIS, SOLARIS8, LINUX, FREEBSD or WIN32) |
| 29 | PLATFORM = LINUX |
| 30 | |
| 31 | # Your C++ compiler: |
| 32 | # (if you change the platform, you may need to change the compiler) |
| 33 | CXX = g++ |
| 34 | |
| 35 | # Flags for the C++ preprocessor (and makedepend as well): |
Harald Welte | 0872b68 | 2017-04-12 12:17:55 +0200 | [diff] [blame] | 36 | CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include/titan |
Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame] | 37 | |
| 38 | # Flags for the C++ compiler: |
| 39 | CXXFLAGS = -Wall |
| 40 | |
| 41 | # Flags for the linker: |
Harald Welte | 0872b68 | 2017-04-12 12:17:55 +0200 | [diff] [blame] | 42 | LDFLAGS = -L$(TTCN3_DIR)/lib/titan |
Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame] | 43 | |
| 44 | ifeq ($(PLATFORM), WIN32) |
| 45 | # Silence linker warnings. |
| 46 | LDFLAGS += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc |
| 47 | endif |
| 48 | |
| 49 | # Utility to create library files |
| 50 | AR = ar |
| 51 | ARFLAGS = |
| 52 | |
| 53 | # Flags for the TTCN-3 and ASN.1 compiler: |
| 54 | COMPILER_FLAGS = -L |
| 55 | |
| 56 | # Execution mode: (either ttcn3 or ttcn3-parallel) |
| 57 | TTCN3_LIB = ttcn3-parallel |
| 58 | |
Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame] | 59 | # The path of your libxml2 installation: |
| 60 | # If you do not have your own one, leave it unchanged. |
| 61 | XMLDIR = $(TTCN3_DIR) |
| 62 | |
| 63 | # Directory to store the archived source files: |
| 64 | # Note: you can set any directory except ./archive |
| 65 | ARCHIVE_DIR = backup |
| 66 | |
| 67 | # |
| 68 | # You may change these variables. Add your files if necessary... |
| 69 | # |
| 70 | |
| 71 | # TTCN-3 modules of this project: |
| 72 | 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 |
| 73 | |
| 74 | # ASN.1 modules of this project: |
| 75 | ASN1_MODULES = |
| 76 | |
| 77 | # C++ source & header files generated from the TTCN-3 & ASN.1 modules of |
| 78 | # this project: |
| 79 | 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 |
| 80 | 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 |
| 81 | |
| 82 | # C/C++ Source & header files of Test Ports, external functions and |
| 83 | # other modules: |
| 84 | USER_SOURCES = SCTPasp_PT.cc |
| 85 | USER_HEADERS = SCTPasp_PT.hh |
| 86 | |
| 87 | # Object files of this project that are needed for the executable test suite: |
| 88 | OBJECTS = $(GENERATED_OBJECTS) $(USER_OBJECTS) |
| 89 | |
| 90 | 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 |
| 91 | |
| 92 | USER_OBJECTS = SCTPasp_PT.o |
| 93 | |
| 94 | # Other files of the project (Makefile, configuration files, etc.) |
| 95 | # that will be added to the archived source files: |
| 96 | OTHER_FILES = Makefile |
| 97 | |
| 98 | # The name of the executable test suite: |
| 99 | EXECUTABLE = SCCP_Test |
| 100 | |
| 101 | |
| 102 | |
| 103 | LIBRARY = lib$(EXECUTABLE).a |
| 104 | |
| 105 | TARGET = $(EXECUTABLE) |
| 106 | |
| 107 | # |
| 108 | # Do not modify these unless you know what you are doing... |
| 109 | # Platform specific additional libraries: |
| 110 | # |
Harald Welte | 0872b68 | 2017-04-12 12:17:55 +0200 | [diff] [blame] | 111 | SOLARIS_LIBS = -lsocket -lnsl -lxml2 |
| 112 | SOLARIS8_LIBS = -lsocket -lnsl -lxml2 |
| 113 | LINUX_LIBS = -lxml2 |
Harald Welte | ac35980 | 2017-04-12 12:13:44 +0200 | [diff] [blame] | 114 | FREEBSD_LIBS = -lxml2 |
| 115 | WIN32_LIBS = -lxml2 |
| 116 | |
| 117 | # |
| 118 | # Rules for building the executable... |
| 119 | # |
| 120 | |
| 121 | all: $(TARGET) ; |
| 122 | |
| 123 | executable: $(EXECUTABLE) ; |
| 124 | |
| 125 | library: $(LIBRARY) ; |
| 126 | |
| 127 | objects: $(OBJECTS) compile; |
| 128 | |
| 129 | $(EXECUTABLE): $(OBJECTS) |
| 130 | if $(CXX) $(LDFLAGS) -o $@ $(OBJECTS) \ |
| 131 | -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \ |
| 132 | -L$(OPENSSL_DIR)/lib -lcrypto \ |
| 133 | -L$(XMLDIR)/lib $($(PLATFORM)_LIBS); \ |
| 134 | then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi |
| 135 | |
| 136 | $(LIBRARY): $(OBJECTS) |
| 137 | $(AR) -r $(ARFLAGS) $(LIBRARY) $(OBJECTS) |
| 138 | |
| 139 | %.o: %.c $(GENERATED_HEADERS) |
| 140 | $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< |
| 141 | |
| 142 | %.o: %.cc $(GENERATED_HEADERS) |
| 143 | $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -o $@ $< |
| 144 | |
| 145 | $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile |
| 146 | @if [ ! -f $@ ]; then rm -f compile; $(MAKE) compile; fi |
| 147 | |
| 148 | check: $(TTCN3_MODULES) $(ASN1_MODULES) |
| 149 | $(TTCN3_DIR)/bin/compiler -s $(COMPILER_FLAGS) \ |
| 150 | $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES) |
| 151 | |
| 152 | port: $(TTCN3_MODULES) $(ASN1_MODULES) |
| 153 | $(TTCN3_DIR)/bin/compiler -t $(COMPILER_FLAGS) \ |
| 154 | $(TTCN3_MODULES) $(PREPROCESSED_TTCN3_MODULES) $(ASN1_MODULES) |
| 155 | |
| 156 | compile: $(TTCN3_MODULES) $(ASN1_MODULES) |
| 157 | $(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) \ |
| 158 | $(TTCN3_MODULES) $(ASN1_MODULES) - $? |
| 159 | touch $@ |
| 160 | |
| 161 | clean: |
| 162 | -rm -f $(EXECUTABLE) $(LIBRARY) $(OBJECTS) $(GENERATED_HEADERS) \ |
| 163 | $(GENERATED_SOURCES) compile \ |
| 164 | tags *.log |
| 165 | |
| 166 | dep: $(GENERATED_SOURCES) $(USER_SOURCES) ; |
| 167 | makedepend $(CPPFLAGS) -DMAKEDEPEND_RUN $(GENERATED_SOURCES) $(USER_SOURCES) |
| 168 | |
| 169 | archive: |
| 170 | mkdir -p $(ARCHIVE_DIR) |
| 171 | tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \ |
| 172 | $(USER_HEADERS) $(USER_SOURCES) $(OTHER_FILES) \ |
| 173 | | gzip >$(ARCHIVE_DIR)/`basename $(TARGET) .exe`-`date '+%y%m%d-%H%M'`.tgz |
| 174 | |
| 175 | diag: |
| 176 | $(TTCN3_DIR)/bin/compiler -v 2>&1 |
| 177 | $(TTCN3_DIR)/bin/mctr_cli -v 2>&1 |
| 178 | $(CXX) -v 2>&1 |
| 179 | $(AR) -V 2>&1 |
| 180 | @echo TTCN3_DIR=$(TTCN3_DIR) |
| 181 | @echo OPENSSL_DIR=$(OPENSSL_DIR) |
| 182 | @echo XMLDIR=$(XMLDIR) |
| 183 | @echo PLATFORM=$(PLATFORM) |
| 184 | |
| 185 | # |
| 186 | # Add your rules here if necessary... |
| 187 | # |
| 188 | |