Commit | Line | Data |
---|---|---|
d44e3c4f | 1 | ############################################################################## |
2 | # Copyright (c) 2000-2016 Ericsson Telecom AB | |
970ed795 EL |
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 | |
d44e3c4f | 7 | # |
8 | # Contributors: | |
9 | # Balasko, Jeno | |
10 | # Delic, Adam | |
11 | # Gecse, Roland | |
12 | # Raduly, Csaba | |
14e21cff | 13 | # Szabo, Bence Janos |
d44e3c4f | 14 | # |
15 | ############################################################################## | |
970ed795 EL |
16 | TOPDIR := ../../ |
17 | include ../../Makefile.regression | |
18 | ||
19 | # Flags for the C++ preprocessor (and makedepend as well): | |
20 | #CPPFLAGS += -D$(PLATFORM) -I$(TTCN3_DIR)/include | |
21 | ||
22 | # Flags for the C++ compiler: | |
23 | #CXXFLAGS += -Wall | |
24 | ||
25 | # Flags for the linker: | |
26 | #LDFLAGS += | |
27 | ||
28 | # Flags for the TTCN-3 and ASN.1 compiler: | |
29 | #COMPILER_FLAGS += -L | |
30 | ||
31 | # Execution mode: (either ttcn3 or ttcn3-parallel) | |
32 | TTCN3_LIB = ttcn3$(RT2_SUFFIX)-parallel$(DYNAMIC_SUFFIX) | |
33 | ||
34 | ||
35 | # | |
36 | # You may change these variables. Add your files if necessary... | |
37 | # | |
38 | ||
39 | # The TTCN-3 modules needed for this project: | |
40 | TTCN3_MODULES = comptest.ttcn | |
41 | ||
42 | # The ASN.1 modules needed for this project: | |
43 | ASN1_MODULES = | |
44 | ||
45 | # C++ source & header files generated by TTCN-3 & ASN.1 compilers: | |
46 | GENERATED_SOURCES = comptest.cc | |
47 | GENERATED_HEADERS = comptest.hh | |
48 | ifdef CODE_SPLIT | |
49 | GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc _seqof.cc _setof.cc _union.cc)) | |
14e21cff | 50 | else ifdef SPLIT_TO_SLICES |
51 | POSTFIXES := $(foreach file, $(SPLIT_TO_SLICES), $(addsuffix $(file), _part_)) | |
52 | POSTFIXES := $(foreach file, $(POSTFIXES), $(addprefix $(file), .cc)) | |
53 | GENERATED_SOURCES2 := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), $(POSTFIXES))) | |
54 | GENERATED_SOURCES += $(GENERATED_SOURCES2) | |
970ed795 EL |
55 | endif |
56 | ||
57 | # Source & header files of Test Ports and your other modules: | |
58 | USER_SOURCES = | |
59 | USER_HEADERS = | |
60 | ||
61 | # All object files needed for the executable test suite: | |
62 | OBJECTS = comptest.o | |
63 | ||
64 | # The name of the executable test suite: | |
65 | TARGET = comptest | |
66 | ||
67 | # | |
68 | # Do not modify these unless you know what you are doing... | |
69 | # | |
70 | #SOLARIS_LIBS = -lxnet | |
71 | #LINUX_LIBS = | |
72 | #FREEBSD_LIBS = | |
73 | #WIN32_LIBS = | |
74 | ||
75 | # | |
76 | # Rules for building the executable... | |
77 | # | |
78 | all: $(TARGET) ; | |
79 | ||
80 | $(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES) | |
81 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \ | |
82 | -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS) | |
83 | ||
84 | $(GENERATED_SOURCES) $(GENERATED_HEADERS): compile | |
85 | @if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi | |
86 | ||
87 | compile: $(TTCN3_MODULES) $(ASN1_MODULES) | |
88 | $(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) $(TTCN3_MODULES) \ | |
89 | $(ASN1_MODULES) - $? | |
90 | touch $@ | |
91 | ||
92 | clean distclean: | |
93 | -$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \ | |
94 | $(GENERATED_SOURCES) compile *.log | |
95 | ||
96 | ||
97 | # | |
98 | # Add your rules here if necessary... | |
99 | # | |
100 |