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