DEBUG=1
CC = gcc
CXX=g++
ifeq ($(DEBUG), 1)
OPTS=-O0 -g -DDEBUG
endif
CFLAGS = -fPIC -I$(COMPILE_DIR) -I$(vesdkdev) -I$(es_common) -I$(vesdk) -I$(vesdk)/boost-153/include -I$(vesdkproject)
CXXFLAGS=$(CFLAGS)
Target = libServerCfg.so
VPATH = src
OBJDIR=obj/
DEPDIR=deps/
CXXFLAGS +=$(OPTS)
CXXFLAGS +=-I../../global_include/ -I$(CrossOnvifLib)/ClientSo/wrapper -I$(CrossOnvifLib)/ClientSo/onvifgen -I$(CrossPlatformLib)/vesdkdev \
-I$(CrossOnvifLib)/Common/gsoap/share/gsoap/plugin -I$(CrossOnvifLib)/Common/gsoap/include -I$(CrossPlatformLib)/es_common -I$(CrossPlatformLib)/vesdk \
-I$(CrossPlatformLib)/vesdkdev/utils/mt/
LDFLAGS+=-shared -lm -pthread
LIBS = -lOnvifClient -lsqlite3 -lboost_system
OBJ= Helper.o Media.o DevicesMgmt.o Imaging.o PTZ.o DiskTool.o ServerCfg.o
OBJS = $(addprefix $(OBJDIR), $(OBJ))
DEPS = $(addprefix $(DEPDIR), $(OBJ))
all: obj $(Target)
$(Target): $(OBJS)
@echo make $(Target)
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) $(LIBS)
cp $(Target) /usr/lib
$(OBJDIR)%.o: %.cpp
$(CC) $(CXXFLAGS) -c $< -o $@
obj:
mkdir -p obj
deps:
mkdir -p deps
.PHONY: clean
clean:
rm -rf $(OBJS) $(Target)
ifeq ("$(wildcard deps)", "")
DEP_DIR_DEPS:=deps
endif
include $(DEPS:.o=.d)
$(DEPDIR)%.d: %.cpp $(DEP_DIR_DEPS)
set -e; rm -f $@; \
$(CC) -MM $(CXXFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,$(OBJDIR)\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。