1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
##############################################################################
# Copyright (c) 2000-2021 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
#
# Contributors:
#
# >
# Baji, Laszlo
# Balasko, Jeno
# Bene, Tamas
# Beres, Szabolcs
# Csondes, Tibor
# Czimbalmos, Eduard
# Delic, Adam
# Feher, Csaba
# Forstner, Matyas
# Gecse, Roland
# Kovacs, Ferenc
# Kremer, Peter
# Raduly, Csaba
# Szabados, Kristof
# Szabo, Janos Zoltan – initial implementation
# Varga, Vilmos
#
##############################################################################
# Makefile for the TTCN-3 Main Controller
TOP := ../..
include $(TOP)/Makefile.cfg
TARGETS :=
ifeq ($(CLI), yes)
TARGETS += mctr_cli$(EXESUFFIX)
endif
ORIGINATORS := main.cc
GENERATED_SOURCES := Cli_main.cc
STATIC_SOURCES := MctrError.cc MainController.cc UserInterface.cc config_data.cc
SOURCES := $(STATIC_SOURCES) $(GENERATED_SOURCES)
GENERATED_HEADERS :=
GENERATED_OTHERS :=
OBJECTS := $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(SOURCES)))
OBJECTS_NOMAIN := $(filter-out Cli_main.o, $(OBJECTS))
COMMON_OBJECTS := $(addprefix ../../common/, memory.o config_preproc.o \
config_preproc_la.o config_preproc_p.tab.o path.o NetworkHandler.o \
Path2.o openssl_version.o) ../../core/RInt.o ../../core/Textbuf.o
ifeq ($(LICENSING), yes)
COMMON_OBJECTS += ../../common/license.o
endif
COMMON_OBJECTS_CLI := $(COMMON_OBJECTS)
DEPFILES := $(patsubst %.cc,%.d,$(patsubst %.c,%.d,$(SOURCES)))
SUBDIRS :=
CPPFLAGS += -D_REENTRANT -I../../core -I../../common
ifdef OPENSSL_DIR
ifneq ($(OPENSSL_DIR), default)
CPPFLAGS += -I$(OPENSSL_DIR)/include
LDFLAGS += -L$(OPENSSL_DIR)/lib
endif
endif
# Platform specific libraries that are necessary for CLI # versions.
SOLARIS_LIBS := -lpthread -lsocket -lnsl
SOLARIS8_LIBS := -lpthread -lsocket -lnsl
LINUX_LIBS := -lpthread
FREEBSD_LIBS := -lpthread
WIN32_LIBS := -lpthread
SOLARIS_CLI_LIBS := -lcurses -ledit
SOLARIS8_CLI_LIBS := -lcurses -ledit
LINUX_CLI_LIBS := -lncurses -ledit
FREEBSD_CLI_LIBS := -lncurses -ledit
WIN32_CLI_LIBS := -lncurses -ledit
INTERIX_CLI_LIBS := -lncurses -ledit
all run: $(TARGETS)
mctr_cli$(EXESUFFIX): Cli_main.o $(OBJECTS_NOMAIN) $(COMMON_OBJECTS_CLI) \
../cli/libcli.a
$(CXX) $(LDFLAGS) -o $@ $^ \
-lcrypto $($(PLATFORM)_CLI_LIBS) $($(PLATFORM)_LIBS) $(RSLICLIB)
install: $(TARGETS)
ifeq ($(DEBUG), no)
$(STRIP) $(TARGETS)
endif
mkdir -p $(BINDIR)
cp $(TARGETS) $(BINDIR)
ifeq ($(CLI), yes)
ln -s mctr_cli$(EXESUFFIX) $(BINDIR)/mctr$(EXESUFFIX)
endif
cp ttcn3_start $(BINDIR)
chmod +x $(BINDIR)/ttcn3_start
Cli_main.cc: main.cc
@echo "#define CLI" > $@ && cat $< >> $@
include ../../Makefile.genrules
|