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