1 ###############################################################################
2 # Copyright (c) 2000-2014 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 ###############################################################################
8 # Makefile for the TTCN-3 Main Controller
11 include $(TOP
)/Makefile.cfg
16 TARGETS
+= mctr_cli
$(EXESUFFIX
)
19 ORIGINATORS
:= main.
cc
21 GENERATED_SOURCES
:= Cli_main.
cc
23 STATIC_SOURCES
:= MctrError.
cc MainController.
cc UserInterface.
cc config_data.
cc
25 SOURCES
:= $(STATIC_SOURCES
) $(GENERATED_SOURCES
)
31 OBJECTS
:= $(patsubst %.
cc,%.o
,$(patsubst %.c
,%.o
,$(SOURCES
)))
33 OBJECTS_NOMAIN
:= $(filter-out Cli_main.o
, $(OBJECTS
))
35 COMMON_OBJECTS
:= $(addprefix ..
/..
/common
/, memory.o config_preproc.o \
36 config_preproc_la.o config_preproc_p.tab.o path.o NetworkHandler.o \
37 Path2.o
) ..
/..
/core
/RInt.o ..
/..
/core
/Textbuf.o
39 ifeq ($(LICENSING
), yes
)
40 COMMON_OBJECTS
+= ..
/..
/common
/license.o
43 COMMON_OBJECTS_CLI
:= $(COMMON_OBJECTS
)
45 DEPFILES
:= $(patsubst %.
cc,%.d
,$(patsubst %.c
,%.d
,$(SOURCES
)))
49 CPPFLAGS
+= -D_REENTRANT
-I..
/..
/core
-I..
/..
/common
52 ifneq ($(OPENSSL_DIR
), default
)
53 CPPFLAGS
+= -I
$(OPENSSL_DIR
)/include
54 LDFLAGS
+= -L
$(OPENSSL_DIR
)/lib
58 # Platform specific libraries that are necessary for CLI # versions.
59 SOLARIS_LIBS
:= -lpthread
-lsocket
-lnsl
60 SOLARIS8_LIBS
:= -lpthread
-lsocket
-lnsl
61 LINUX_LIBS
:= -lpthread
62 FREEBSD_LIBS
:= -lpthread
63 WIN32_LIBS
:= -lpthread
65 SOLARIS_CLI_LIBS
:= -lcurses
66 SOLARIS8_CLI_LIBS
:= -lcurses
67 LINUX_CLI_LIBS
:= -lncurses
68 FREEBSD_CLI_LIBS
:= -lncurses
69 WIN32_CLI_LIBS
:= -lncurses
70 INTERIX_CLI_LIBS
:= -lncurses
74 mctr_cli
$(EXESUFFIX
): Cli_main.o
$(OBJECTS_NOMAIN
) $(COMMON_OBJECTS_CLI
) \
75 ..
/cli
/libcli.a ..
/editline
/build
/src
/.libs
/libedit.a
76 $(CXX
) $(LDFLAGS
) -o
$@
$^ \
77 -lcrypto
$($(PLATFORM
)_CLI_LIBS
) $($(PLATFORM
)_LIBS
) $(RSLICLIB
)
84 cp
$(TARGETS
) $(BINDIR
)
86 ln
-s mctr_cli
$(EXESUFFIX
) $(BINDIR
)/mctr
$(EXESUFFIX
)
88 cp ttcn3_start
$(BINDIR
)
89 chmod
+x
$(BINDIR
)/ttcn3_start
92 @echo
"#define CLI" > $@
&& cat
$< >> $@
94 include ..
/..
/Makefile.genrules