mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
ST: Refine tools and CMakeLists.txt. Add backtrace example. v5.0.79
This commit is contained in:
parent
d9cf874033
commit
5a1a234855
18 changed files with 410 additions and 353 deletions
24
trunk/3rdparty/st-srs/tools/backtrace/Makefile
vendored
Normal file
24
trunk/3rdparty/st-srs/tools/backtrace/Makefile
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
.PHONY: default clean
|
||||
|
||||
LDLIBS=../../obj/libst.a -ldl
|
||||
CFLAGS=-g -O0 -rdynamic -I../../obj
|
||||
|
||||
OS_NAME = $(shell uname -s)
|
||||
ST_TARGET = linux-debug
|
||||
ifeq ($(OS_NAME), Darwin)
|
||||
ST_TARGET = darwin-debug
|
||||
CPU_ARCHS = $(shell g++ -dM -E - </dev/null |grep -q '__x86_64' && echo x86_64)
|
||||
CPU_ARCHS += $(shell g++ -dM -E - </dev/null |grep -q '__aarch64' && echo arm64)
|
||||
CFLAGS += -arch $(CPU_ARCHS)
|
||||
endif
|
||||
|
||||
./backtrace: backtrace.c $(LDLIBS)
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -Wall -o $@ $^ $(LDLIBS)
|
||||
|
||||
clean:
|
||||
cd ../.. && make clean
|
||||
rm -rf backtrace backtrace.dSYM
|
||||
|
||||
$(LDLIBS):
|
||||
cd ../.. && make $(ST_TARGET)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue