-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefrag
48 lines (43 loc) · 1.37 KB
/
makefrag
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
# if you want to use external interfaces with inet, you should install
# winpcap (on windows) or libpcap-dev (on linux) and re-run ./configure in
# the omnetpp root directory and comment out the following line:
HAVE_PCAP=no
ifeq ($(HAVE_PCAP),yes)
# link with PCAP libs too
LIBS += $(PCAP_LIBS)
else
# remove the HAVE_PCAP define if we do not need PCAP
CFLAGS := $(filter-out -DHAVE_PCAP,$(CFLAGS))
endif
#
# TCP implementaion using the Network Simulation Cradle (TCP_NSC feature)
#
ifneq (,$(findstring -DWITH_TCP_NSC,$(COPTS)))
NSC_VERSION= $(shell ls -d ../3rdparty/nsc* 2>/dev/null | sed 's/^.*-//')
ifneq ($(NSC_VERSION),)
CFLAGS += -I../3rdparty/nsc-$(NSC_VERSION)/sim -DHAVE_NSC
LIBS += -Wl,-rpath,`abspath ../3rdparty/nsc-$(NSC_VERSION)`
endif
endif
#
# pkg-config:
#
HAVE_PKGCFG := $(shell pkg-config --version 2>/dev/null)
ifeq ($(strip $(HAVE_PKGCFG)),)
HAVE_PKGCFG := no
else
HAVE_PKGCFG := yes
PKGCFG := $(shell which pkg-config)
endif
#
# VoipTool feature:
#
ifneq (,$(findstring -DWITH_VOIPTOOL,$(COPTS)))
ifeq ($(HAVE_PKGCFG), yes)
HAVE_FFMPEG := $(shell $(PKGCFG) --exists libavcodec libavformat libavutil && echo yes || echo no)
ifeq ($(HAVE_FFMPEG), yes)
LIBS += $(shell $(PKGCFG) --libs libavcodec libavformat libavutil)
CFLAGS += $(shell $(PKGCFG) --cflags libavcodec libavformat libavutil) -DHAVE_FFMPEG
endif
endif
endif