代码拉取完成,页面将自动刷新
OPENMP=1
USE_SOCKET=1
USE_USBCAMERA=1
DEBUG=0
CC = gcc
CPPC = g++
LIB = ar
LIBDIR = ./lib/x64_gnu
REMOVE = rm -rf
CCFLAGS = -O2 -fPIC -Wall -Wno-format
ifeq ($(OPENMP), 1)
CCFLAGS += -fopenmp
endif
ifeq ($(DEBUG), 1)
CCFLAGS += -DDEBUG
endif
WRAPDEF =
DEPENDLIB = -lopenblas -lm
ifeq ($(USE_SOCKET),1)
WRAPDEF += -DMORN_USE_SOCKET
endif
ifeq ($(USE_USBCAMERA),1)
WRAPDEF += -DMORN_USE_USBCAMERA
endif
STATICLIB = $(LIBDIR)/libmorn.a
SHAREDLIB = ./tool/libmorn.so
TOOLSOURCES = $(wildcard ./tool/*.c)
TOOLEXE = $(patsubst %.c,%.exe,$(TOOLSOURCES))
CSOURCES = $(wildcard ./src/util/*.c)
CSOURCES += $(wildcard ./src/ptc/*.c)
CSOURCES += $(wildcard ./src/math/*.c)
CSOURCES += $(wildcard ./src/wave/*.c)
CSOURCES += $(wildcard ./src/image/*.c)
# CSOURCES += $(wildcard ./src/machine_learning/*.c)
CSOURCES += $(wildcard ./src/deep_learning/*.c)
WRAPSOURCES = $(wildcard ./src/wrap/*.c)
WRAPOBJS = $(patsubst %.c,%.o,$(WRAPSOURCES))
WRAPSOURCES2 = $(wildcard ./src/wrap/*.cpp)
WRAPOBJS2 = $(patsubst %.cpp,%.o,$(WRAPSOURCES2))
ifeq ($(JPG_PNG), 1)
CSOURCES += $(wildcard ./src/wrap/*.c)
endif
OBJS = $(patsubst %.c,%.o,$(CSOURCES))
INCLUDEDIR = -I ./include
#-I ./lib/include/
all:$(STATICLIB) $(TOOLEXE)
tool:$(TOOLEXE)
%.exe:%.c $(STATICLIB)
$(CC) $(CCFLAGS) $(INCLUDEDIR) $< $(STATICLIB) -L $(LIBDIR) $(DEPENDLIB) -o $@
static:$(STATICLIB)
$(STATICLIB):$(OBJS) $(WRAPOBJS) $(WRAPOBJS2)
$(LIB) -rc $(STATICLIB) $(OBJS) $(WRAPOBJS) $(WRAPOBJS2)
shared:$(SHAREDLIB)
$(SHAREDLIB):$(OBJS) $(WRAPOBJS) $(WRAPOBJS2)
$(CC) $(CCFLAGS) -shared $(OBJS) $(WRAPOBJS) $(WRAPOBJS2) -L $(LIBDIR) $(DEPENDLIB) -o $(SHAREDLIB)
$(WRAPOBJS):%.o:%.c
$(CC) $(CCFLAGS) $(WRAPDEF) $(INCLUDEDIR) -c $< -o $@
$(WRAPOBJS2):%.o:%.cpp
$(CPPC) $(CCFLAGS) $(WRAPDEF) $(INCLUDEDIR) -c $< -o $@
$(OBJS):%.o:%.c
$(CC) $(CCFLAGS) $(INCLUDEDIR) -c $< -o $@
clean:
$(REMOVE) $(OBJS)
$(REMOVE) $(WRAPOBJS)
$(REMOVE) $(WRAPOBJS2)
$(REMOVE) $(STATICLIB)
$(REMOVE) $(SHAREDLIB)
$(REMOVE) $(TOOLEXE)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。