Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
e19fc4f6
提交
e19fc4f6
authored
8月 03, 2015
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve Makefile.
上级
8062c365
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
24 行增加
和
24 行删除
+24
-24
Makefile
Makefile
+24
-24
没有找到文件。
Makefile
浏览文件 @
e19fc4f6
...
...
@@ -43,14 +43,14 @@ APP_HEADERS := $(shell find $(APP_HEADERS_DIR) -name "*.h")
APP_BIN_DIR
:=
./bin
# System libraries to link with.
SYSTEM_LIB
RARIE
S
:=
pthread
SYSTEM_LIBS
:=
pthread
# External libraries with pkg-config support.
PKG_LIB
RARIE
S
:=
PKG_LIB
RARIE
S
+=
libuv
>=
1.6.1
PKG_LIB
RARIE
S
+=
libconfig++
>=
1.4.8
PKG_LIB
RARIE
S
+=
openssl
>=
1.0.1
PKG_LIB
RARIE
S
+=
libsrtp
>=
1.5.2
PKG_LIBS
:=
PKG_LIBS
+=
libuv
>=
1.6.1
PKG_LIBS
+=
libconfig++
>=
1.4.8
PKG_LIBS
+=
openssl
>=
1.0.1
PKG_LIBS
+=
libsrtp
>=
1.5.2
# Dependencies source files.
DEP_SOURCES
:=
...
...
@@ -61,16 +61,16 @@ DEP_HEADERS_DIRS :=
DEP_HEADERS_DIRS
+=
./deps/jsoncpp/dist
# Dependencies static libraries to link with.
DEP_LIB
RARIE
S
:=
DEP_LIBS
:=
# Object files to build.
ALL_OBJS
=
${
APP_SOURCES
:.cpp
=.o
}
${
DEP_SOURCES
:.cpp
=.o
}
ALL_OBJS
:
=
${
APP_SOURCES
:.cpp
=.o
}
${
DEP_SOURCES
:.cpp
=.o
}
# CPPFLAGS is the C preprocessor flags, so anything that compiles a C or C++ source
# file into an object file will use this flag.
CPPFLAGS
+=
-I
$(APP_HEADERS_DIR)
CPPFLAGS
+=
$
(
foreach
dir
,
$(DEP_HEADERS_DIRS)
,
-I
$(dir)
)
CPPFLAGS
+=
$(
shell
pkg-config
--cflags
"
$(PKG_LIB
RARIE
S)
"
)
CPPFLAGS
+=
$(
shell
pkg-config
--cflags
"
$(PKG_LIBS)
"
)
# CXXFLAGS gives a list of flags that should be passed to the C++ compiler (use
# this, for example, to set the version of the C++ language, to specify the
...
...
@@ -79,18 +79,18 @@ CXXFLAGS += -std=c++11 -Wall $(DEV_FLAGS)
# LDFLAGS are used when linking, this will cause the appropriate flags to
# be passed to the linker.
LDFLAGS
+=
$
(
foreach lib
rary,
$(SYSTEM_LIBRARIES)
,
-l
$(library
)
)
LDFLAGS
+=
$(
shell
pkg-config
--libs
"
$(PKG_LIB
RARIE
S)
"
)
LDFLAGS
+=
$
(
foreach lib
,
$(SYSTEM_LIBS)
,
-l
$(lib
)
)
LDFLAGS
+=
$(
shell
pkg-config
--libs
"
$(PKG_LIBS)
"
)
#
# Targets
#
# This indicates that "all", APP_NAME, "check_pkg_lib
rarie
s" and "clean" are
# This indicates that "all", APP_NAME, "check_pkg_libs" and "clean" are
# "phony targets". Therefore calling "make XXXX" should execute the content of its
# build rules, even if a newer file named "XXXX" exists.
.PHONY
:
all $(APP_NAME) check_pkg_lib
rarie
s clean deps
.PHONY
:
all $(APP_NAME) check_pkg_libs clean deps
# This is first build rule in the Makefile, and so executing "make" and executing
# "make all" are the same. The target simply depends on $(APP_NAME).
...
...
@@ -102,13 +102,13 @@ all: $(APP_NAME)
# the same name as the app. Note that LINK.cc makes use of CXX, CXXFLAGS,
# LFLAGS, etc. LINK.cc is usually defined as: $(CXX) $(CXXFLAGS) $(CPPFLAGS)
# $(LDFLAGS) $(TARGET_ARCH).
$(APP_NAME)
:
check_pkg_lib
rarie
s $(ALL_OBJS)
@
mkdir
-p
$(APP_BIN_DIR)
$
(
LINK.cc
)
$(ALL_OBJS)
$(DEP_LIB
RARIE
S)
-o
$(APP_BIN_DIR)
/
$(APP_NAME)
$(APP_NAME)
:
check_pkg_libs $(ALL_OBJS)
@
mkdir
-p
$(APP_BIN_DIR)
$
(
LINK.cc
)
$(ALL_OBJS)
$(DEP_LIBS)
-o
$(APP_BIN_DIR)
/
$(APP_NAME)
# Check
the
required libraries with pkg-support.
check_pkg_lib
rarie
s
:
pkg-config
--exists
--print-errors
"
$(PKG_LIB
RARIE
S)
"
# Check required libraries with pkg-support.
check_pkg_libs
:
pkg-config
--exists
--print-errors
"
$(PKG_LIBS)
"
# This target removes the built app and the generated object files. The @ symbol
# indicates that the line should be run silently, and the - symbol indicates that
...
...
@@ -118,11 +118,11 @@ clean:
$(RM)
$(ALL_OBJS)
deps
:
# Retrieve Git data for dependencies.
#
$(
shell
git submodule init
)
#
$(
shell
git submodule update
)
# jsoncpp stuff.
$(
shell
cd
./deps/jsoncpp
&&
python amalgamate.py
>
/dev/null
)
@
echo
"INFO: retrieving Git submodules..."
git submodule init
git submodule update
@
echo
"INFO: building jsoncpp stuff..."
cd
./deps/jsoncpp
&&
python amalgamate.py
>
/dev/null
doc
:
cldoc generate
$(CXXFLAGS)
$(CPPFLAGS)
$(LDFLAGS)
--
--output
cldoc
$(APP_SOURCES)
$(APP_HEADERS)
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论