admin管理员组文章数量:1516870
carlife
makefile
需要用到的库交叉编译即可
如这些库:protobuf
#Author:
# Liu CaiQuan
#Date:
# 7th Semptember 2015
#CarLife Protocol version:
# V0.15
#
#rule for Linux
#
# Copyright (C) Under BaiDu, Inc.#TOPDIR:=~/EddyWorkSpace/CarLifeLibSourceCode/trunkTOPDIR:=$(shell pwd)
export TOPDIR#CROSS_COMPILE=
CROSS_COMPILE ?=arm-linux-gnueabihf-
LD=$(CROSS_COMPILE)ld
CC=$(CROSS_COMPILE)g++CP=cpexport LD CC #COM_FLAGS = -Wall -O2 -fPIC -mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=hard -mthumb-interwork -marm
#CFLAGS = $(COM_FLAGS) -std=c++14#CFLAGS = -g
CFLAGS:=-g -Wall -O2 -fPIC -mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=hard -mthumb-interwork -marm -std=c++11
CFLAGS+=-I protobuf/cc/include
CFLAGS+=-I $(TOPDIR)/include
CFLAGS+=-I $(TOPDIR)/protobuf/cc/include
#CFLAGS+=-I /usr/local/include#CFLAGS+=-I /usr/protobuf/includeCFLAGS+=-I $(TOPDIR)/protobuf/include
CFLAGS+=-I $(TOPDIR)/H264Player/include
CFLAGS+=-I $(TOPDIR)/H264Player/ffmpeg-4.1.3/include
CFLAGS+=-I $(TOPDIR)/H264Player/sstar/include
CFLAGS+=-I $(TOPDIR)/protobuf/include/google/protobuf
CFLAGS+=-I $(TOPDIR)/protobuf/include/google/protobuf/io
CFLAGS+=-I $(TOPDIR)/protobuf/include/google/protobuf/stubs#CFLAGS+=-I /usr/protobuf/include/google/protobuf
#CFLAGS+=-I /usr/protobuf/include/google/protobuf/io
#CFLAGS+=-I /usr/protobuf/include/google/protobuf/stubs#CFLAGS+=-I /usr/include#CFLAGS+=-I /usr/include/libxml2#LFLAGS:=-fPIC -shared
#LFLAGS+=-L/usr/local/lib -lprotobuf
LFLAGS+=-L$(TOPDIR)/H264Player/ffmpeg-4.1.3/lib -L$(TOPDIR)/H264Player/sstar/lib
LFLAGS+=-L$(TOPDIR)/protobuf/lib #LFLAGS+=-L/usr/protobuf/lib -L/usr/protobuf/lib/libprotobuf.aENABLE_HDMI = 0
USE_FFMPEG = 1ifeq ($(USE_FFMPEG), 1)
LIB_NAME += -lavformat -lavcodec -lavutil
endififeq ($(ENABLE_HDMI), 1)
LIB_PATH += -lmi_hdmi
else
LIB_NAME += -lmi_panel
endifLIB_NAME += -lprotobuf -lm -lmi_vdec -lmi_sys -lmi_gfx -lmi_disp -lmi_ao -lmi_common -ldl -lcarlifevehicle -lpthread export CFLAGS LFLAGSOBJDIR=obj#obj-y+=CarLifeLibTest.o
obj-y+=H264Player/
obj-y+=core/
obj-y+=libwrapper/
obj-y+=modules/
obj-y+=protobuf/
obj-y+=utility/TARGET-LIB=libcarlifevehicle.so
TARGET-APP=libtest all: carlifelib libtestcarlifelib: make -C ./ -f $(TOPDIR)/Makefile.build$(CC) -shared -o $(TARGET-LIB) built-in.o$(CP) $(TARGET-LIB) $(OBJDIR) libtest:CarLifeLibTest.cpp$(CC) -o $(TARGET-APP) $< $(CFLAGS) -L./ $(LFLAGS) $(LIB_NAME) $(CP) $(TARGET-APP) $(OBJDIR)$(CP) $(TOPDIR)/libtest $(TOPDIR)/out/bin/$(CP) $(TOPDIR)/libcarlifevehicle.so $(TOPDIR)/out/lib/$(CP) $(TOPDIR)/protobuf/lib/libprotobuf.so.8 $(TOPDIR)/out/lib/$(CP) $(TOPDIR)/H264Player/ffmpeg-4.1.3/lib/libavcodec.so.58 $(TOPDIR)/out/lib/$(CP) $(TOPDIR)/H264Player/ffmpeg-4.1.3/lib/libavformat.so.58 $(TOPDIR)/out/lib/$(CP) $(TOPDIR)/H264Player/ffmpeg-4.1.3/lib/libavutil.so.56 $(TOPDIR)/out/lib/protoBuf:rm -f ./protobuf/pbGen/*protoc --proto_path=./protobuf/proto/ --cpp_out=./protobuf/pbGen ./protobuf/proto/*.protorm -f ./protobuf/cc/src/*rm -f ./protobuf/cc/include/*.hmv ./protobuf/pbGen/* ./protobuf/cc/src/mv ./protobuf/pbGen/*.h ./protobuf/cc/include/clean:rm -f $(shell find -name "*.o")rm -f $(TARGET-LIB)rm -f $(TARGET-APP)rm -f $(OBJDIR)/*rm -f $(TOPDIR)/out/bin/*rm -f $(TOPDIR)/out/lib/*distclean:rm -f $(shell find -name "*.o")rm -f $(shell find -name "*.d")rm -f $(TARGET-LIB)rm -f $(TARGET-APP)rm -f $(OBJDIR)/*rm -f $(TOPDIR)/out/bin/*rm -f $(TOPDIR)/out/lib/*
本文标签: carlife
版权声明:本文标题:carlife 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.betaflare.com/biancheng/1701604798a447904.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论