-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.inc.in
282 lines (258 loc) · 7.13 KB
/
Makefile.inc.in
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
#
# Do not edit this file -- it gets generated from Makefile.inc.in.
# Your changes will be lost the next time ./configure is run.
#
OMNETPP_PRODUCT = @OMNETPP_PRODUCT@
OMNETPP_RELEASE = @OMNETPP_RELEASE@
OMNETPP_VERSION = @OMNETPP_VERSION@
OMNETPP_BUILDID = @OMNETPP_BUILDID@
OMNETPP_EDITION = @OMNETPP_EDITION@
#
# Optional features (set to "yes" to enable the feature)
#
WITH_QTENV ?= @WITH_QTENV@
WITH_OSG ?= @WITH_OSG@
WITH_OSGEARTH ?= @WITH_OSGEARTH@
WITH_NETBUILDER ?= @WITH_NETBUILDER@
WITH_PARSIM ?= @WITH_PARSIM@
WITH_SYSTEMC ?= @WITH_SYSTEMC@
WITH_TKENV ?= @WITH_TKENV@
EMBED_TCL_CODE ?= @EMBED_TCL_CODE@
PREFER_SQLITE_RESULT_FILES ?= @PREFER_SQLITE_RESULT_FILES@
#
# SHARED_LIBS determines whether omnetpp is built as shared or static libs
# By default we use shared libs
#
SHARED_LIBS ?= @SHARED_LIBS@
#
# Directories
#
# NOTE: it is important to evaluate the current path immediately in this file using :=
OMNETPP_ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
OMNETPP_IMAGE_PATH := ./bitmaps:./images:$(OMNETPP_ROOT)/images
OMNETPP_BIN_DIR = $(OMNETPP_ROOT)/bin
OMNETPP_INCL_DIR = $(OMNETPP_ROOT)/include
OMNETPP_LIB_DIR = $(OMNETPP_ROOT)/lib$(OUTPUT_PREFIX)
OMNETPP_OUT_DIR = $(OMNETPP_ROOT)/out$(OUTPUT_PREFIX)
OMNETPP_SRC_DIR = $(OMNETPP_ROOT)/src
OMNETPP_UTILS_DIR = $(OMNETPP_SRC_DIR)/utils
OMNETPP_TKENV_DIR = $(OMNETPP_SRC_DIR)/tkenv
OMNETPP_UI_DIR = $(OMNETPP_ROOT)/ui
OMNETPP_DOC_DIR = $(OMNETPP_ROOT)/doc
OMNETPP_SAMPLES_DIR = $(OMNETPP_ROOT)/samples
OMNETPP_TEST_DIR = $(OMNETPP_ROOT)/test
PLATFORM = @PLATFORM@
# platform specific code
ifeq ($(PLATFORM),win32.x86_64)
OMNETPP_TOOLS_DIR = $(OMNETPP_ROOT)/tools/win64
OMNETPP_IMAGE_PATH := $(shell cygpath -p -m '$(OMNETPP_IMAGE_PATH)')
else ifeq ($(PLATFORM),macosx)
OMNETPP_TOOLS_DIR = $(OMNETPP_ROOT)/tools/macosx
else
# Linux and other platforms do not have a tools directory
endif
#
# Configure MODE specific flags/suffixes
#
ifeq ($(MODE),debug)
CFLAGS=$(CFLAGS_DEBUG)
D=_dbg
else
# by default assume release mode
MODE=release
CFLAGS=$(CFLAGS_RELEASE)
D=
endif
# use statically built omnetpp if we are building the IDE native helper library
ifeq ($(BUILDING_UILIBS),yes)
SHARED_LIBS=no
OUTPUT_PREFIX=/ui
endif
#
# Configname determines where (in which subdirectory of out/)
# makemake-generated makefiles create object files and other
# build artifacts.
#
CONFIGNAME ?= $(TOOLCHAIN_NAME)-$(MODE)
#
# Control verbosity. Specifiying V=1 will make the build output verbose. You can use:
# $(Q) to hide commands only in quiet mode
# $(qecho) to print out something only in quite mode
# $(vecho) to print out something only in verbose mode
#
ifeq ($(V),1)
Q :=
vecho = @echo
qecho = @true
else
Q := @
vecho = @true
qecho = @echo
endif
# Recursive wildcard function. Call like: $(call opp_rwildcard, src/, *.c *.h)
opp_rwildcard=$(foreach d,$(wildcard $1*),$(call opp_rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
#
# tools, libraries and compiler flags detected by ./configure
#
PERL = @PERL@
YACC = @YACC@
LEX = @LEX@
CC = @CC@
CXX = @CXX@
TOOLCHAIN_NAME = @TOOLCHAIN_NAME@
DEFINES =@DEFINES@
CFLAGS_DEBUG =@CFLAGS_DEBUG@
CFLAGS_RELEASE =@CFLAGS_RELEASE@
CFLAGS +=@CFLAGS@
CXXFLAGS = @CXXFLAGS@
LDFLAG_LIBPATH = @LDFLAG_LIBPATH@
LDFLAG_INCLUDE = @LDFLAG_INCLUDE@
LDFLAG_LIB = @LDFLAG_LIB@
LDFLAG_IMPLIB = @LDFLAG_IMPLIB@
LDFLAGS = @LDFLAGS@
WHOLE_ARCHIVE_ON = @WHOLE_ARCHIVE_ON@
WHOLE_ARCHIVE_OFF = @WHOLE_ARCHIVE_OFF@
AS_NEEDED_ON = @AS_NEEDED_ON@
AS_NEEDED_OFF = @AS_NEEDED_OFF@
PIC_FLAGS = @PIC_FLAGS@
MSGC = @MSGC@
SMC = @SMC@
NEDTOOL = @NEDTOOL@
AS = @AS@
AR = @AR@
ARFLAG_OUT = @ARFLAG_OUT@
RANLIB = @RANLIB@
SHLIB_LD = @SHLIB_LD@
DLLTOOL = @DLLTOOL@
STRIP = @STRIP@
WISH = @WISH@
MAKEDEPEND = @MAKEDEPEND@
LN = @LN@
MKPATH = @MKPATH@
SHLIB_POSTPROCESS = @SHLIB_POSTPROCESS@
SWIG = @SWIG@
QMAKE = @QMAKE@
MOC=@MOC@
UIC=@UIC@
RCC=@RCC@
HAVE_DLOPEN = @HAVE_DLOPEN@
SYS_LIBS = @SYS_LIBS@
TK_CFLAGS = @TK_CFLAGS@
TK_LIBS = @TK_LIBS@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
QTENV_LDFLAGS = @QTENV_LDFLAGS@
OSG_CFLAGS = @OSG_CFLAGS@
OSG_LIBS = @OSG_LIBS@
OSGEARTH_CFLAGS = @OSGEARTH_CFLAGS@
OSGEARTH_LIBS = @OSGEARTH_LIBS@
ZLIB_CFLAGS = @ZLIB_CFLAGS@
ZLIB_LIBS = @ZLIB_LIBS@
MPI_CFLAGS = @MPI_CFLAGS@
MPI_LIBS = @MPI_LIBS@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
XMLPARSER = @XMLPARSER@
XML_CFLAGS = @XML_CFLAGS@
XML_LIBS = @XML_LIBS@
DEFINES += -DXMLPARSER=$(XMLPARSER)
AKAROA_CFLAGS = @AKAROA_CFLAGS@
AKAROA_LIBS = @AKAROA_LIBS@
JNILIBS_IF_POSSIBLE = @JNILIBS_IF_POSSIBLE@
JAVA_CFLAGS = @JAVA_CFLAGS@
JAVA_LIBS = @JAVA_LIBS@
#
# platform specific library and executable prefixes and extensions
#
A_LIB_SUFFIX = @A_LIB_SUFFIX@
SO_LIB_SUFFIX = @SO_LIB_SUFFIX@
DLL_LIB_SUFFIX = @DLL_LIB_SUFFIX@
JNI_LIB_SUFFIX = @JNI_LIB_SUFFIX@
EXE_SUFFIX = @EXE_SUFFIX@
LIB_PREFIX = @LIB_PREFIX@
SHARED_LIB_SUFFIX = @SHARED_LIB_SUFFIX@
#
# omnetpp and system libraries linked with the simulations
#
TKENV_LIBS = $(LDFLAG_INCLUDE)_tkenv_lib $(AS_NEEDED_OFF) -lopptkenv$D -loppenvir$D -lopplayout$D
QTENV_LIBS = $(LDFLAG_INCLUDE)_qtenv_lib $(AS_NEEDED_OFF) $(QTENV_LDFLAGS) -loppqtenv$D -loppenvir$D -lopplayout$D
CMDENV_LIBS = $(LDFLAG_INCLUDE)_cmdenv_lib $(AS_NEEDED_OFF) -loppcmdenv$D -loppenvir$D
ALL_ENV_LIBS = $(CMDENV_LIBS)
KERNEL_LIBS = -loppsim$D
OPPMAIN_LIB = $(LDFLAG_LIB)oppmain$D
#
# flags and libraries required for Qtenv
#
ifeq ($(WITH_QTENV),yes)
DEFINES += -DPREFER_QTENV -DWITH_QTENV
# libraries required for static linking
ifneq ($(SHARED_LIBS),yes)
QTENV_LIBS += $(QT_LIBS)
ifeq ($(WITH_OSG),yes)
QTENV_LIBS += $(OSG_LIBS)
KERNEL_LIBS += -losg -lOpenThreads
endif
ifeq ($(WITH_OSGEARTH),yes)
QTENV_LIBS += $(OSGEARTH_LIBS)
KERNEL_LIBS += -losgEarth
endif
ifeq ($(PLATFORM),macosx)
QTENV_LIBS += -framework Carbon
endif
endif
ALL_ENV_LIBS += $(QTENV_LIBS)
endif
#
# flags and libraries required for Ttenv
#
ifeq ($(WITH_TKENV),yes)
DEFINES += -DWITH_TKENV
# libraries required for static linking
ifneq ($(SHARED_LIBS),yes)
TKENV_LIBS += $(TK_LIBS) $(ZLIB_LIBS)
ifeq ($(PLATFORM),macosx)
TKENV_LIBS += -framework Carbon
endif
endif
ALL_ENV_LIBS += $(TKENV_LIBS)
endif
#
# Other defines
#
ifeq ($(WITH_PARSIM),yes)
DEFINES += -DWITH_PARSIM
# extra libs needed during static building
ifneq ($(SHARED_LIBS),yes)
KERNEL_LIBS += $(MPI_LIBS)
endif
endif
ifeq ($(WITH_NETBUILDER),yes)
DEFINES += -DWITH_NETBUILDER
endif
# note: defines for OSG and osgEarth must be available even if WITH_QTENV=no
ifeq ($(WITH_OSG),yes)
DEFINES += -DWITH_OSG
endif
ifeq ($(WITH_OSGEARTH),yes)
DEFINES += -DWITH_OSGEARTH
endif
#
# toolchain specific flags and options
#
ifeq ($(TOOLCHAIN_NAME),clangc2)
# this macro can be used to pass EXPORT macros to the compiler if omnet is built as shared library
ifeq ($(SHARED_LIBS),yes)
IMPORT_DEFINES = -DOMNETPPLIBS_IMPORT
EXPORT_DEFINES = $(EXPORT_MACRO)
endif
endif
#
# handle differences between shared and static lib builds
#
ifeq ($(SHARED_LIBS),yes)
LIB_SUFFIX = $(SHARED_LIB_SUFFIX)
else
LIB_SUFFIX = $(A_LIB_SUFFIX)
# extra libraries needed when statically linking (because of indirect dependencies)
KERNEL_LIBS += -loppnedxml$D -loppcommon$D $(XML_LIBS)
endif