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