O2
OUTDIR=../../server/linux
ServerLibPath=../lib_X64
CPP =g++
CC =gcc
LD =ld
CFLAGS =-D_REENTRANT -D_LINUX -Wall -O2 -pthread -Who-deprecated -g
CFLAGS+= -I ./include(路径)
SRCS =$(wildcard src/*.cpp)
OBJS= $(patsubst %.cpp,%.o,$(SRCS))
LDLIBS=../lib/libonvif.a
LIBS=-L../lib -lxmnetsdk -lhcnetsdk(动态库)
CFLAGS +=-D_DEBUG
EXEC=$(P_OUTDIR)/DMS
all :checkoutdir $(EXEC)
$(EXEC):$(OBJS) $(LDLIBS)
$(CPP) $(CFLAGS) -o $@ $(OBJS) $(LDLIBS) $(LIBS)
.c.o:
$(CC) -c $(CFLAGS) $< -o $@
.cpp.o:
$(CPP) -c $(CFLASS)$< -o $@
checkoutdir:
@if test !-d $(P_OUTDIR);\
then\
mkdir $(p_OUTDIR);\
fi
clean:
rm -rf $(OBJS) $(EXEC)*