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 ###############################################################################
9 include ..
/Makefile.regression
11 # WARNING! This Makefile can be used with GNU make only.
12 # Other versions of make may report syntax errors in it.
15 # Do NOT touch this line...
17 .PHONY
: all archive
check clean dep objects
20 # Flags for the C++ compiler:
23 # Flags for the linker:
26 # Flags for the TTCN-3 and ASN.1 compiler:
27 #COMPILER_FLAGS += -Lg
29 # Execution mode: (either ttcn3 or ttcn3-parallel)
30 TTCN3_LIB
= ttcn3
$(RT2_SUFFIX
)$(DYNAMIC_SUFFIX
)
33 # You may change these variables. Add your files if necessary...
36 # TTCN-3 modules of this project:
37 TTCN3_MODULES
= converter.ttcn convertest.ttcn
39 # ASN.1 modules of this project:
42 # C++ source & header files generated from the TTCN-3 & ASN.1 modules of
44 GENERATED_SOURCES
= $(TTCN3_MODULES
:.ttcn
=.
cc) $(ASN1_MODULES
:.asn
=.
cc)
45 GENERATED_HEADERS
= $(GENERATED_SOURCES
:.
cc=.hh
)
47 GENERATED_SOURCES
:= $(foreach file
, $(GENERATED_SOURCES
:.
cc=), $(addprefix $(file
), .
cc _seq.
cc _set.
cc _seqof.
cc _setof.
cc _union.
cc))
50 # C/C++ Source & header files of Test Ports, external functions and
52 USER_SOURCES
= iconver.
cc
53 USER_HEADERS
= $(USER_SOURCES
:.
cc=.hh
)
55 # Object files of this project that are needed for the executable test suite:
56 OBJECTS
= $(GENERATED_SOURCES
:.
cc=.o
) $(USER_SOURCES
:.
cc=.o
)
58 # Other files of the project (Makefile, configuration files, etc.)
59 # that will be added to the archived source files:
60 OTHER_FILES
= Makefile
62 # The name of the executable test suite:
63 TARGET
= convertest
$(EXESUFFIX
)
66 # Do not modify these unless you know what you are doing...
67 # Platform specific additional libraries:
68 # -lxml2 (and -lxnet on SOLARIS*) already there
69 SOLARIS_LIBS
+= -lsocket
-lnsl
-lcrypto
70 SOLARIS8_LIBS
+= -lsocket
-lnsl
-lcrypto
71 LINUX_LIBS
+= -lcrypto
72 FREEBSD_LIBS
+= -lcrypto
-liconv
73 WIN32_LIBS
+= -lcrypto
-liconv
74 INTERIX_LIBS
+= -L
/usr
/local
/ssl
/lib
-lcrypto
77 # Rules for building the executable...
84 # Don't bother with .o files
85 $(TARGET
): $(GENERATED_SOURCES
) $(USER_SOURCES
)
86 $(CXX
) $(CPPFLAGS
) $(CXXFLAGS
) $(LDFLAGS
) -o
$@
$^ \
87 -L
$(TTCN3_DIR
)/lib
-l
$(TTCN3_LIB
) \
88 -L
$(XMLDIR
)/lib
-L
$(OPENSSL_DIR
)/lib
$($(PLATFORM
)_LIBS
)
90 $(GENERATED_SOURCES
) $(GENERATED_HEADERS
): compile
91 @if
[ ! -f
$@
]; then
$(RM
) compile
; $(MAKE
) compile
; fi
93 compile
: $(TTCN3_MODULES
) $(ASN1_MODULES
)
94 $(TTCN3_COMPILER
) $(COMPILER_FLAGS
) $^
- $?
98 -$(RM
) $(TARGET
) $(OBJECTS
) $(GENERATED_HEADERS
) \
99 $(GENERATED_SOURCES
) compile \
104 # Add your rules here if necessary...
107 RUN
:= $(shell which colortitan
2>/dev
/null
)
108 ifeq ($(firstword $(RUN
)),no
)
109 # stupid /bin/which on Solaris writes errors to stdout instead of stderr
113 run
: $(TARGET
) config.cfg
116 vpath iconver.
cc $(ABS_SRC
)
117 vpath
%.ttcn
$(ABS_SRC
)