1 Star 0 Fork 13

魏治礼/汉智

forked from 韩路彪/汉智 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
makefile 1.92 KB
一键复制 编辑 原始数据 按行查看 历史
韩路彪 提交于 2018-06-26 19:44 . 'origin'
CC = g++
CFLAGS = -I$(inFloder)/ -lm -lpthread -O3 -march=native -Wall -Wno-comment -finput-charset=GBK -mavx -std=gnu++11
inFloder = src
cbals=/usr/local/openbals-0.3.0
PREFIX = /usr/local/hanzhi-0.01
soFloder = $(PREFIX)/lib
includeFloder = $(PREFIX)/include
coreFiles = $(inFloder)/core/HanZhi_en.cpp $(inFloder)/core/CPU_en.cpp \
$(inFloder)/core/CPUCalculator_en.cpp
w2vFiles = $(inFloder)/w2v/w2v_en.cpp
nnFiles = $(inFloder)/nn/actuator_en.cpp $(inFloder)/nn/cal_en.cpp $(inFloder)/nn/CPUCalMaxPool_en.cpp \
$(inFloder)/nn/data_en.cpp $(inFloder)/nn/graph_en.cpp $(inFloder)/nn/nodes_en.cpp $(inFloder)/nn/train_en.cpp
hanzhi:libhanzhiCore.so libw2v.so libnn.so
libhanzhiCore.so:$(coreFiles)
$(CC) $(coreFiles) -fPIC -shared -o libhanzhiCore.so $(CFLAGS)
libw2v.so:$(w2vFiles)
$(CC) $(w2vFiles) -fPIC -shared -o libw2v.so $(CFLAGS)
libnn.so:$(nnFiles)
#如果要使用CBLAS需要先安装CBLAS,然后使用【-D USE_CBLAS】进行编译
ifeq ($(USE_CBLAS), y)
$(CC) $(nnFiles) -fPIC -shared -o libnn.so $(CFLAGS) -I$(cbals)/include -D USE_CBLAS
else
$(CC) $(nnFiles) -fPIC -shared -o libnn.so $(CFLAGS)
endif
install:
install -d $(soFloder)
install -m 755 libhanzhiCore.so $(soFloder)/libhanzhiCore.so
install -m 755 libw2v.so $(soFloder)/libw2v.so
install -m 755 libnn.so $(soFloder)/libnn.so
echo $(soFloder) > hanzhi-x86_64.conf
install -m 644 hanzhi-x86_64.conf /etc/ld.so.conf.d/hanzhi-x86_64.conf
rm hanzhi-x86_64.conf -f
install -d $(includeFloder) $(includeFloder)/core $(includeFloder)/w2v $(includeFloder)/nn
install -m 755 $(inFloder)/core/*.h $(includeFloder)/core
install -m 755 $(inFloder)/w2v/*.h $(includeFloder)/w2v
install -m 755 $(inFloder)/nn/*.h $(includeFloder)/nn
install -m 755 $(inFloder)/nn/*.type $(includeFloder)/nn
ldconfig
uninstall:
rm /etc/ld.so.conf.d/hanzhi-x86_64.conf $(soFloder) $(includeFloder) -rf
ldconfig
clean:
rm libhanzhiCore.so libw2v.so libnn.so -f
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/wei_zhili/hanzhi.git
git@gitee.com:wei_zhili/hanzhi.git
wei_zhili
hanzhi
汉智
master

搜索帮助