Created
August 24, 2018 16:24
-
-
Save baixiangcpp/201aa6f32b14ae89cf70acd143274b7d to your computer and use it in GitHub Desktop.
Makefile for seafile client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version = 6.2.4 | |
THREADS = 4 | |
HOST_OS = MINGW32 | |
JANSSONDIR = jansson-2.11 | |
LIBEVENTDIR = libevent-2.1.8-stable | |
LIBSEARPCDIR = libsearpc-3.1-latest | |
SEAFILEDIR = seafile-$(version) | |
SEAFILECLIENTDIR = seafile-client-$(version) | |
ifeq ($(HOST_OS),) | |
PREFIX = $(shell pwd)/build | |
export PATH = $(PREFIX)/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin | |
export PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig | |
export C_INCLUDE_PATH = $(PREFIX)/include | |
export CPLUS_INCLUDE_PATH = $(PREFIX)/include | |
export PYTHON_DIR = $(PREFIX)/python | |
else | |
HOST = i686-w64-mingw32 | |
BUILD = x86_64-redhat-linux-gnu | |
TARGET = i686-w64-mingw32 | |
PREFIX = $(shell pwd)/ms-build | |
OPTION = --host=$(HOST) --build=$(BUILD) --target=$(TARGET) | |
TOOLCHAIN = -DCMAKE_TOOLCHAIN_FILE=/home/eric/Toolchain-cross-linux.cmake | |
export PATH = $(PREFIX)/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin | |
export PKG_CONFIG = mingw32-pkg-config | |
export PKG_CONFIG_PATH = /usr/$(TARGET)/sys-root/mingw/lib/pkgconfig:$(PREFIX)/lib/pkgconfig | |
export C_INCLUDE_PATH = $(PREFIX)/include:/usr/$(TARGET)/sys-root/mingw/include | |
export CPLUS_INCLUDE_PATH = $(PREFIX)/include | |
export PYTHON_DIR = $(PREFIX)/python | |
endif | |
jansson: | |
cd $(JANSSONDIR);\ | |
./configure --prefix=$(PREFIX) $(OPTION);\ | |
make -j $(THREADS);\ | |
make install | |
libevent: | |
cd $(LIBEVENTDIR);\ | |
./configure --prefix=$(PREFIX) $(OPTION);\ | |
make -j $(THREADS); \ | |
make install | |
libsearpc: jansson libevent | |
cd $(LIBSEARPCDIR); \ | |
sed -i 's/build_os/host_os/g' configure.ac;\ | |
bash ./autogen.sh; \ | |
./configure --prefix=$(PREFIX) $(OPTION); \ | |
make -j $(THREADS); \ | |
make install | |
seafile: libsearpc | |
cd $(SEAFILEDIR);\ | |
sed -i 's/Rpc.h/rpc.h/g' lib/utils.c;\ | |
sed -i 's/build_os/host_os/g' configure.ac;\ | |
sed -i 's/lRpcrt4/lrpcrt4/g' configure.ac;\ | |
sed -i 's/AccCtrl.h/accctrl.h/g' daemon/set-perm.c;\ | |
sed -i 's/AclApi.h/aclapi.h/g' daemon/set-perm.c;\ | |
bash ./autogen.sh;\ | |
./configure --prefix=$(PREFIX) $(OPTION);\ | |
make -j $(THREADS);\ | |
make install | |
seafileclient:seafile | |
cd $(SEAFILECLIENTDIR);\ | |
sed -i 's/ShlObj.h/shlobj.h/g' src/ui/init-seafile-dialog.cpp;\ | |
cmake $(TOOLCHAIN) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX); \ | |
make -j $(THREADS); \ | |
make install | |
clean: | |
make -C $(SEAFILECLIENTDIR) clean; \ | |
make -C $(LIBEVENTDIR) clean; \ | |
make -C $(JANSSONDIR) clean; \ | |
make -C $(LIBSEARPCDIR) clean; \ | |
make -C $(SEAFILEDIR) clean |
对了,SeaDrive Client有研究过交叉编译的版本不
这是个啥,很久没用过seafile了
是它的一个挂载盘
大神,我在Makefile中写的是,export PKG_CONFIG_PATH =
加我微信:13338859466
yzliulei
***@***.***
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2023年11月23日(星期四) 下午3:41
收件人: ***@***.***>;
抄送: ***@***.***>;
主题: Re: baixiangcpp/Makefile
@tdzyaosi commented on this gist.
大神,我在Makefile中写的是,export PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig:/usr/$(TARGET)/sys-root/mingw/lib/pkgconfig, 两个路径中间用:隔开,到了编译的时候,就变成,-L/usr/i686-w64-mingw32/sys-root/mingw/home/ys/Documents/ms-build/lib,中间连在一起,报错,找不到-levent, -lsearpc, -ljansson,该怎么解决
—
Reply to this email directly, view it on GitHub or unsubscribe.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS or Android.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这是个啥,很久没用过seafile了