1 Star 0 Fork 67

yeung908/aquila

forked from gozfree/aquila 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 3.75 KB
一键复制 编辑 原始数据 按行查看 历史
gozfree 提交于 2020-12-05 12:52 . fix crash on exit
###############################################################################
# common
###############################################################################
#ARCH: linux/pi/android/ios/
ARCH ?= linux
CROSS_PREFIX ?=
OUTPUT ?= /usr/local
BUILD_DIR := $(shell pwd)/../build/
ARCH_INC := $(BUILD_DIR)/$(ARCH).inc
COLOR_INC := $(BUILD_DIR)/color.inc
ifeq ($(ARCH_INC), $(wildcard $(ARCH_INC)))
include $(ARCH_INC)
endif
CC = $(CROSS_PREFIX)gcc
CXX = $(CROSS_PREFIX)g++
LD = $(CROSS_PREFIX)ld
AR = $(CROSS_PREFIX)ar
ifeq ($(COLOR_INC), $(wildcard $(COLOR_INC)))
include $(COLOR_INC)
else
CC_V = $(CC)
CXX_V = $(CXX)
LD_V = $(LD)
AR_V = $(AR)
CP_V = $(CP)
RM_V = $(RM)
endif
###############################################################################
# target and object
###############################################################################
TGT_NAME = aquila
###############################################################################
# cflags and ldflags
###############################################################################
CFLAGS_SDL = `pkg-config --cflags sdl`
LDFLAGS_SDL = `pkg-config --libs sdl`
LDFLAGS_X264 = -lx264
LDFLAGS_FDKAAC = -lfdk-aac
#LDFLAGS_ALSA = -lasound
LDFLAGS_FFMPEG = `pkg-config --libs libavformat libavutil libavcodec libswscale`
LDFLAGS_JPEG = -ljpeg
LDFLAGS_LUA = -llua5.2
CFLAGS := -g -Wall -Werror
# -fsanitize=address
CFLAGS += -I./
CFLAGS += -I./algo
CFLAGS += -I./codec
CFLAGS += -I./device
CFLAGS += -I./filter
CFLAGS += -I./muxer
CFLAGS += -I./playback
CFLAGS += -I./protocol
CFLAGS += -I./util
CFLAGS += -I/usr/local/include/gear-lib
CFLAGS += -Wl,-rpath=/usr/local/lib
CFLAGS += $(CFLAGS_SDL)
LDFLAGS :=
LDFLAGS += -lgcc_s -lc
LDFLAGS += -L$(OUTPUT)/lib
LDFLAGS += -L/usr/local/lib/gear-lib -lposix -ldebug -llog -lconfig -lgevent -ltime -lrtsp -ldict -lfile -lvector -lsock
LDFLAGS += -L/usr/local/lib/gear-lib -lthread -lmacro -lrpc -lhash -lworkq -luvc -luac -lmedia-io -ldarray -lmp4
LDFLAGS += -L/usr/local/lib/gear-lib -lrtmpc
LDFLAGS += -lqueue
LDFLAGS += -lpthread -lrt
# -lasan
LDFLAGS += $(LDFLAGS_SDL)
LDFLAGS += $(LDFLAGS_X264)
LDFLAGS += $(LDFLAGS_FDKAAC)
LDFLAGS += $(LDFLAGS_ALSA)
LDFLAGS += $(LDFLAGS_FFMPEG)
LDFLAGS += $(LDFLAGS_JPEG)
LDFLAGS += $(LDFLAGS_LUA)
.PHONY : all clean
TGT := $(TGT_NAME)
ALGO_OBJS :=
CODEC_OBJS := \
codec/codec.o \
codec/x264_enc.o \
codec/aac_enc.o \
codec/mjpeg_enc.o
#codec/h264_enc.o \
#codec/h264_dec.o \
DEVICE_OBJS := \
device/device.o \
device/usbcam.o \
device/microphone.o \
device/vdevfake.o
FILTER_OBJS := \
filter/filter.o \
filter/videocap_filter.o \
filter/videoenc_filter.o \
filter/videodec_filter.o \
filter/upstream_filter.o \
filter/record_filter.o \
filter/playback_filter.o \
filter/remotectrl_filter.o
MUXER_OBJS := \
muxer/muxer.o \
muxer/flv.o \
muxer/mp4.o
PLAYBACK_OBJS := \
playback/playback.o \
playback/sdl.o \
playback/snkfake.o
PROTOCOL_OBJS := \
protocol/protocol.o \
protocol/rtmp.o \
protocol/rtsp.o \
protocol/rtp.o \
protocol/rtp_h264.o \
protocol/rpcd.o
UTIL_OBJS := \
util/url.o \
util/config.o \
util/imgconvert.o \
util/overlay.o
OBJS := \
$(ALGO_OBJS) \
$(CODEC_OBJS) \
$(DEVICE_OBJS) \
$(FILTER_OBJS) \
$(MUXER_OBJS) \
$(PLAYBACK_OBJS) \
$(PROTOCOL_OBJS) \
$(UTIL_OBJS) \
main.o
all: $(TGT)
%.o:%.c
$(CC_V) -c $(CFLAGS) $< -o $@
%.o:%.cc
$(CXX_V) -c $(CFLAGS) $< -o $@
%.o:%.cpp
$(CXX_V) -c $(CFLAGS) $< -o $@
$(TGT_NAME): $(OBJS)
$(CC_V) -o $@ $^ $(LDFLAGS)
clean:
$(RM_V) -f $(OBJS)
$(RM_V) -f $(TGT)
install:
$(CP_V) -f $(TGT_NAME) ${OUTPUT}/bin
uninstall:
$(RM_V) -f ${OUTPUT}/bin/$(TGT_NAME)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/yeung908/aquila.git
git@gitee.com:yeung908/aquila.git
yeung908
aquila
aquila
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385