Merge pull request #279 from retamia/master

fix: mac 下php_client编译出错的问题
pull/484/head
YuQing 2019-11-22 07:40:02 +08:00 committed by GitHub
commit 7455191fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 93 additions and 3 deletions

82
.gitignore vendored Normal file
View File

@ -0,0 +1,82 @@
# Makefile.in
storage/Makefile
tracker/Makefile
client/test/Makefile
client/Makefile
# client/fdfs_link_library.sh.in
client/fdfs_link_library.sh
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
client/fdfs_append_file*
client/fdfs_appender_test*
client/fdfs_crc32*
client/fdfs_delete_file*
client/fdfs_download_file*
client/fdfs_file_info*
client/fdfs_monitor*
client/fdfs_test*
client/fdfs_test1*
client/fdfs_upload_appender*
client/fdfs_upload_file*
storage/fdfs_storaged*
tracker/fdfs_trackerd*
# other
php_client/.deps
php_client/.libs/
php_client/Makefile
php_client/Makefile.fragments
php_client/Makefile.global
php_client/Makefile.objects
php_client/acinclude.m4
php_client/aclocal.m4
php_client/autom4te.cache/
php_client/build/
php_client/config.guess
php_client/config.h
php_client/config.h.in
php_client/config.log
php_client/config.nice
php_client/config.status
php_client/config.sub
php_client/configure
php_client/configure.ac
php_client/install-sh
php_client/libtool
php_client/ltmain.sh
php_client/missing
php_client/mkinstalldirs
php_client/run-tests.php

View File

@ -6,7 +6,7 @@ ENABLE_SHARED_LIB = $(ENABLE_SHARED_LIB)
INC_PATH = -I../common -I../tracker -I/usr/include/fastcommon
LIB_PATH = $(LIBS) -lfastcommon
TARGET_PATH = $(TARGET_PREFIX)/bin
TARGET_LIB = $(TARGET_PREFIX)/lib64
TARGET_LIB = $(TARGET_PREFIX)/$(LIB_VERSION)
TARGET_INC = $(TARGET_PREFIX)/include
CONFIG_PATH = $(TARGET_CONF_PATH)

12
make.sh
View File

@ -23,15 +23,21 @@ else
OS_BITS=64
fi
uname=$(uname)
if [ "$OS_BITS" -eq 64 ]; then
LIB_VERSION=lib64
if [ "$uname" = "Darwin" ]; then
LIB_VERSION=lib
else
LIB_VERSION=lib64
fi
else
LIB_VERSION=lib
fi
LIBS=''
uname=$(uname)
if [ "$uname" = "Linux" ]; then
if [ "$OS_BITS" -eq 64 ]; then
LIBS="$LIBS -L/usr/lib64"
@ -44,6 +50,7 @@ elif [ "$uname" = "FreeBSD" ] || [ "$uname" = "Darwin" ]; then
CFLAGS="$CFLAGS"
if [ "$uname" = "Darwin" ]; then
CFLAGS="$CFLAGS -DDARWIN"
TARGET_PREFIX=$TARGET_PREFIX/local
fi
elif [ "$uname" = "SunOS" ]; then
LIBS="$LIBS -L/usr/lib"
@ -131,6 +138,7 @@ cp Makefile.in Makefile
perl -pi -e "s#\\\$\(CFLAGS\)#$CFLAGS#g" Makefile
perl -pi -e "s#\\\$\(LIBS\)#$LIBS#g" Makefile
perl -pi -e "s#\\\$\(TARGET_PREFIX\)#$TARGET_PREFIX#g" Makefile
perl -pi -e "s#\\\$\(LIB_VERSION\)#$LIB_VERSION#g" Makefile
perl -pi -e "s#\\\$\(TARGET_CONF_PATH\)#$TARGET_CONF_PATH#g" Makefile
perl -pi -e "s#\\\$\(ENABLE_STATIC_LIB\)#$ENABLE_STATIC_LIB#g" Makefile
perl -pi -e "s#\\\$\(ENABLE_SHARED_LIB\)#$ENABLE_SHARED_LIB#g" Makefile