1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00
srs/trunk/3rdparty/st-srs/utest/Makefile
winlin 442cf615c0 ST: Simplify it, only Linux/Darwin, epoll/kqueue, single process. 5.0.2
commit f4872e528cad07f8ea683cc8cb26e34111bad1b5
Author: winlin <winlin@vip.126.com>
Date:   Fri Feb 26 09:13:21 2021 +0800

    ST: For #2188: Remove sendmmsg from ST.

commit aaeb8919bd4a026268e0600398cb1e9ad477663f
Author: winlin <winlin@vip.126.com>
Date:   Thu Mar 11 08:09:54 2021 +0800

    ST: Refine utest script.

commit d1ac9da53060b6bfa82b5d041da4c2ad9bd6b90a
Author: winlin <winlin@vip.126.com>
Date:   Wed Mar 3 11:02:25 2021 +0800

    ST: Support fast utest and coverage

commit 8400115b83c022e33f59422dbf6d85ee46fb9edb
Author: winlin <winlin@vip.126.com>
Date:   Fri Feb 26 07:02:19 2021 +0800

    ST: Always use unserialized accept for linux or darwin

commit c3686f2bca80d2c139239b08975575b1bb981ffa
Author: winlin <winlin@vip.126.com>
Date:   Fri Feb 26 06:54:05 2021 +0800

    ST: Refine ARFLAGS by disable the verbose log

commit aaa5c4f863eba278c4ed2b29a46297fb01a4ed63
Author: winlin <winlin@vip.126.com>
Date:   Thu Feb 25 08:58:46 2021 +0800

    ST: Stack always grows from top to down.

commit dddd466e5c2e418c6f4896cd8bf701130052b3d9
Author: winlin <winlin@vip.126.com>
Date:   Thu Feb 25 08:51:31 2021 +0800

    ST: Ignore process fork, for single process only

commit 7906cb5f6e78c916cb8b8d9522275bfc086bb6a3
Author: winlin <winlin@vip.126.com>
Date:   Thu Feb 25 08:50:59 2021 +0800

    ST: Fix build warnings

commit d94921b84a3b6cf88ace2c766cc2bfedb9c0602e
Author: winlin <winlin@vip.126.com>
Date:   Thu Feb 25 07:27:45 2021 +0800

    ST: Remove select and poll support, only epoll and kqueue

commit 76d202514615f78d1a8f2b15778f3dac5abf4abb
Author: winlin <winlin@vip.126.com>
Date:   Thu Feb 25 07:10:47 2021 +0800

    ST: Remove multiple OS support, except Linux and Darwin.

commit 13c4ba345c61170e86dde486a174378ca235f442
Author: winlin <winlin@vip.126.com>
Date:   Thu Feb 25 06:59:35 2021 +0800

    ST: Remove __ia64__ CPU support

commit 46c06e4a11879cfeb828382e44f11287782ce4b5
Author: winlin <winlin@vip.126.com>
Date:   Wed Feb 24 11:37:27 2021 +0800

    ST: Remove unused files for ST
2021-05-19 18:25:49 +08:00

60 lines
2.1 KiB
Makefile

# The main dir of st.
ST_DIR = ..
# The main dir of st utest.
ST_UTEST = .
# The main dir of gtest.
GTEST_DIR = $(ST_UTEST)/gtest
# Flags passed to the C++ compiler.
CXXFLAGS += -g -O0 -std=c++11
CXXFLAGS += -DGTEST_USE_OWN_TR1_TUPLE=1
# Flags for warnings.
WARNFLAGS += -Wall -Wno-deprecated-declarations -Wno-unused-private-field -Wno-unused-command-line-argument
# House-keeping build targets.
all : $(ST_DIR)/obj/st_utest
clean :
rm -f $(ST_DIR)/obj/st_utest* $(ST_DIR)/obj/gtest*
# Usually you shouldn't tweak such internal variables, indicated by a
# trailing _.
GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_DIR)/include/gtest/*.h $(GTEST_DIR)/include/gtest/internal/*.h
# For simplicity and to avoid depending on Google Test's
# implementation details, the dependencies specified below are
# conservative and not optimized. This is fine as Google Test
# compiles fast and for ordinary users its source rarely changes.
$(ST_DIR)/obj/gtest-all.o : $(GTEST_SRCS_)
$(CXX) -c $(GTEST_DIR)/src/gtest-all.cc -o $@ \
$(CXXFLAGS) \
$(WARNFLAGS) \
-I$(GTEST_DIR)/include -I$(GTEST_DIR)
$(ST_DIR)/obj/gtest.a : $(ST_DIR)/obj/gtest-all.o
$(AR) $(ARFLAGS) $@ $^
#####################################################################################
#####################################################################################
# ST(state-threads) utest section
#####################################################################################
#####################################################################################
# Depends, the depends objects
ST_UTEST_DEPS = $(ST_DIR)/obj/libst.a
# Depends, utest header files
UTEST_DEPS = $(ST_UTEST)/st_utest.hpp
# Objects, build each object of utest
$(ST_DIR)/obj/st_utest.o : st_utest.cpp $(ST_UTEST_DEPS) $(UTEST_DEPS)
$(CXX) -c st_utest.cpp -o $@ \
$(CXXFLAGS) $(UTEST_FLAGS) \
$(WARNFLAGS) \
-I$(GTEST_DIR)/include -I$(ST_UTEST) -I$(ST_DIR) -I$(ST_DIR)/obj
# generate the utest binary
$(ST_DIR)/obj/st_utest : $(ST_DIR)/obj/st_utest.o $(ST_DIR)/obj/gtest.a $(ST_UTEST_DEPS)
$(CXX) -o $@ $(CXXFLAGS) $(UTEST_FLAGS) \
-lpthread -ldl $^