代码拉取完成,页面将自动刷新
OPENMP=1
USE_SOCKET=1
USE_USBCAMERA=0
DEBUG=0
CC = cl.exe
LIB = lib.exe
LINK = link.exe
LIBDIR = ./lib/x64_msvc
CCFLAGS = -O2 -nologo
ifeq ($(OPENMP), 1)
CCFLAGS += -openmp
endif
ifeq ($(DEBUG), 1)
CCFLAGS += -D DEBUG
endif
WRAPDEF =
DEPENDLIB = $(LIBDIR)/libopenblas.lib
ifeq ($(USE_SOCKET),1)
WRAPDEF += -D MORN_USE_SOCKET
endif
ifeq ($(USE_USBCAMERA),1)
WRAPDEF += -D MORN_USE_USBCAMERA
DEPENDLIB += Ole32.lib strmiids.lib OleAut32.lib
endif
STATICLIB = $(LIBDIR)/libmorn.lib
SHAREDLIB = ./tool/libmorn.dll
TOOLSOURCES = $(wildcard ./tool/*.c)
TOOLEXE = $(patsubst %.c,%.exe,$(TOOLSOURCES))
CSOURCES = $(wildcard ./src/util/*.c)
CSOURCES += $(wildcard ./src/math/*.c)
CSOURCES += $(wildcard ./src/ptc/*.c)
CSOURCES += $(wildcard ./src/wave/*.c)
CSOURCES += $(wildcard ./src/image/*.c)
# CSOURCES += $(wildcard ./src/machine_learning/*.c)
CSOURCES += $(wildcard ./src/deep_learning/*.c)
OBJS = $(patsubst %.c,%.obj,$(CSOURCES))
WRAPSOURCES = $(wildcard ./src/wrap/*.c)
WRAPOBJS = $(patsubst %.c,%.obj,$(WRAPSOURCES))
WRAPSOURCES2 = $(wildcard ./src/wrap/*.cpp)
WRAPOBJS2 = $(patsubst %.cpp,%.obj,$(WRAPSOURCES2))
INCLUDEDIR = -I ./include -I C:/ProgramFiles/CPack/include
all:$(STATICLIB) $(TOOLEXE)
tool:$(TOOLEXE)
%.exe:%.c $(STATICLIB)
$(CC) $(CCFLAGS) $(INCLUDEDIR) $< $(STATICLIB) $(DEPENDLIB) -Fe"$@"
static:$(STATICLIB)
$(STATICLIB):$(OBJS) $(WRAPOBJS) $(WRAPOBJS2)
$(LIB) /out:$(STATICLIB) $(OBJS) $(WRAPOBJS) $(WRAPOBJS2)
shared:$(SHAREDLIB)
$(SHAREDLIB):$(OBJS) $(WRAPOBJS) $(WRAPOBJS2)
$(LINK) -DLL -out:$(SHAREDLIB) $(OBJS) $(WRAPOBJS) $(WRAPOBJS2) $(DEPENDLIB)
$(WRAPOBJS):%.obj:%.c
$(CC) $(CCFLAGS) $(WRAPDEF) $(INCLUDEDIR) -c $< -Fo"$@"
$(WRAPOBJS2):%.obj:%.cpp
$(CC) $(CCFLAGS) $(WRAPDEF) $(INCLUDEDIR) -c $< -Fo"$@"
$(OBJS):%.obj:%.c
$(CC) $(CCFLAGS) $(INCLUDEDIR) -c $< -Fo"$@"
#clean:
# del /a /s .\src\*.obj
# del /a .\tool\*.exe
# del /a .\tool\libmorn.dll
# del /a .\lib\x64\msvc\libmorn.lib
clean:
rm -rf $(OBJS)
rm -rf $(WRAPOBJS)
rm -rf $(WRAPOBJS2)
rm -rf $(STATICLIB)
rm -rf $(SHAREDLIB)
rm -rf $(TOOLEXE)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。