diff --git a/README.md b/README.md index c2ed8c2d..5ac819cc 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,20 @@ C/C++写的一个百度网盘工具,可以在linux终端中使用。 #### 下载 [适用Windows的预编译版本] 或 下载 .net4.0 带窗体版本 [BaiduCloudDisk for .Net 4.0] +编译 (Mac): +=================================== +### 1. 获取源代码 + git clone https://github.com/GangZhuo/BaiduPCS.git +### 2. 安装依赖 + brew install openssl +### 3. 编译源代码 + cd BaiduPCS + make clean + make + make install #将安装到/usr/local/bin下 +### 4. 手动安装到其他目录,例如 /usr/bin 下 + cp ./bin/pcs /usr/bin/ + 编译 (Openwrt): =================================== ### 进入 [Openwrt SDK] 目录,然后执行如下命令: diff --git a/makefile b/makefile index 7b44a32c..1dc66d3b 100644 --- a/makefile +++ b/makefile @@ -14,7 +14,7 @@ CYGWIN_CCFLAGS = endif ifeq ($(LC_OS_NAME), darwin) -APPLE_CCFLAGS = -largp +APPLE_CCFLAGS = -I/usr/local/opt/openssl/include else APPLE_CCFLAGS = endif @@ -26,7 +26,7 @@ else CCFLAGS:=-g -D_FILE_OFFSET_BITS=64 -DDEBUG -D_DEBUG endif -PCS_CCFLAGS = -fPIC $(CCFLAGS) +PCS_CCFLAGS = -fPIC $(CCFLAGS) $(CYGWIN_CCFLAGS) $(APPLE_CCFLAGS) all: bin/libpcs.a bin/pcs @@ -102,7 +102,7 @@ uninstall4-dev: .PHONY : clean clean : - -rm ./bin/*.o ./bin/*.so ./bin/libpcs.a ./bin/pcs + -rm -f ./bin/*.o ./bin/*.so ./bin/libpcs.a ./bin/pcs .PHONY : pre pre :