summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMartijn Otto <martijn.otto@copernica.com>2015-03-26 16:00:10 +0100
committerMartijn Otto <martijn.otto@copernica.com>2015-03-26 16:00:10 +0100
commit7a928e2b19bddf152fd838469cc50805d4132401 (patch)
tree0a6657f4b94c27556b2f218e407f752018540d3b /Makefile
parentae4fa5f871d937773e9facde87a32784e715e3ae (diff)
Changed default visibility for symbols in the PHP-CPP library to hidden and explicitly exported all symbols available from the public API. Moved the hiddenpointer to the zend implementation directory as it is not meant to be used publicly and not referenced anywhere from the API anyway
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile44
1 files changed, 22 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index b5a5277..c04f50a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,11 @@
#
# PHP-CPP Makefile
#
-# This makefile has a user friendly order: the top part of this file contains
+# This makefile has a user friendly order: the top part of this file contains
# all variable settings that you may alter to suit your own system, while at
# the bottom you will find instructions for the compiler in which you will
# probably not have to make any changes
-#
+#
#
# Php-config utility
@@ -13,9 +13,9 @@
# PHP comes with a standard utility program called 'php-config'. This program
# can be used to find out in which directories PHP is installed. Inside this
# makefile this utility program is used to find include directories, shared
-# libraries and the path to the binary file. If your php-config is not
+# libraries and the path to the binary file. If your php-config is not
# installed in the default directory, you can change that here.
-#
+#
PHP_CONFIG = php-config
@@ -35,12 +35,12 @@ PHP_BIN = $(shell ${PHP_CONFIG} --php-binary)
#
# Installation directory
#
-# When you install the PHP-CPP library, it will place a number of C++ *.h
+# When you install the PHP-CPP library, it will place a number of C++ *.h
# header files in your system include directory, and a libphpcpp.so shared
# library file in your system libraries directory. Most users set this to
# the regular /usr/include and /usr/lib directories, or /usr/local/include
# and /usr/local/lib. You can of course change it to whatever suits you best
-#
+#
INSTALL_PREFIX = /usr
INSTALL_HEADERS = ${INSTALL_PREFIX}/include
@@ -65,7 +65,7 @@ HHVM_STATIC_LIBRARY = libhhvmcpp.a
# Compiler
#
# By default, the GNU C++ compiler is used. If you want to use a different
-# compiler, you can change that here. You can change this for both the
+# compiler, you can change that here. You can change this for both the
# compiler (the program that turns the c++ files into object files) and for
# the linker (the program that links all object files into a single .so
# library file. By default, g++ (the GNU C++ compiler) is used for both.
@@ -88,16 +88,16 @@ endif
#
# Compiler flags
#
-# This variable holds the flags that are passed to the compiler. By default,
-# we include the -O2 flag. This flag tells the compiler to optimize the code,
-# but it makes debugging more difficult. So if you're debugging your application,
-# you probably want to remove this -O2 flag. At the same time, you can then
+# This variable holds the flags that are passed to the compiler. By default,
+# we include the -O2 flag. This flag tells the compiler to optimize the code,
+# but it makes debugging more difficult. So if you're debugging your application,
+# you probably want to remove this -O2 flag. At the same time, you can then
# add the -g flag to instruct the compiler to include debug information in
# the library (but this will make the final libphpcpp.so file much bigger, so
# you want to leave that flag out on production servers).
#
-COMPILER_FLAGS = -Wall -c -g -std=c++11
+COMPILER_FLAGS = -Wall -c -g -std=c++11 -fvisibility=hidden -DBUILDING_PHPCPP
SHARED_COMPILER_FLAGS = -fpic
STATIC_COMPILER_FLAGS =
PHP_COMPILER_FLAGS = ${COMPILER_FLAGS} `${PHP_CONFIG} --includes`
@@ -121,7 +121,7 @@ HHVM_LINKER_FLAGS = ${LINKER_FLAGS}
#
# Command to remove files, copy files and create directories.
#
-# I've never encountered a *nix environment in which these commands do not work.
+# I've never encountered a *nix environment in which these commands do not work.
# So you can probably leave this as it is
#
@@ -134,7 +134,7 @@ MKDIR = mkdir -p
# The source files
#
# For this we use a special Makefile function that automatically scans the
-# common/, zend/ and hhvm/ directories for all *.cpp files. No changes are
+# common/, zend/ and hhvm/ directories for all *.cpp files. No changes are
# probably necessary here
#
@@ -146,8 +146,8 @@ HHVM_SOURCES = $(wildcard hhvm/*.cpp)
# The object files
#
# The intermediate object files are generated by the compiler right before
-# the linker turns all these object files into the libphpcpp.so and
-# libhhvmcpp.so shared libraries. We also use a Makefile function here that
+# the linker turns all these object files into the libphpcpp.so and
+# libhhvmcpp.so shared libraries. We also use a Makefile function here that
# takes all source files.
#
@@ -201,22 +201,22 @@ clean:
${RM} static ${PHP_STATIC_LIBRARY} ${HHVM_STATIC_LIBRARY}
find -name *.o | xargs ${RM}
-${COMMON_SHARED_OBJECTS}:
+${COMMON_SHARED_OBJECTS}:
${COMPILER} ${COMPILER_FLAGS} ${SHARED_COMPILER_FLAGS} -o $@ ${@:shared/%.o=%.cpp}
-${COMMON_STATIC_OBJECTS}:
+${COMMON_STATIC_OBJECTS}:
${COMPILER} ${COMPILER_FLAGS} ${STATIC_COMPILER_FLAGS} -o $@ ${@:static/%.o=%.cpp}
-${PHP_SHARED_OBJECTS}:
+${PHP_SHARED_OBJECTS}:
${COMPILER} ${PHP_COMPILER_FLAGS} ${SHARED_COMPILER_FLAGS} -o $@ ${@:shared/%.o=%.cpp}
-${PHP_STATIC_OBJECTS}:
+${PHP_STATIC_OBJECTS}:
${COMPILER} ${PHP_COMPILER_FLAGS} ${STATIC_COMPILER_FLAGS} -o $@ ${@:static/%.o=%.cpp}
-${HHVM_SHARED_OBJECTS}:
+${HHVM_SHARED_OBJECTS}:
${COMPILER} ${HHVM_COMPILER_FLAGS} ${SHARED_COMPILER_FLAGS} -o $@ ${@:shared/%.o=%.cpp}
-${HHVM_STATIC_OBJECTS}:
+${HHVM_STATIC_OBJECTS}:
${COMPILER} ${HHVM_COMPILER_FLAGS} ${STATIC_COMPILER_FLAGS} -o $@ ${@:static/%.o=%.cpp}
install: