From d8af7675389df1bf4796e03e9286fdadba882d38 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Fri, 7 Mar 2014 10:52:55 +0100 Subject: removed tabs from makefile, work in progress on implementing SPL interfaces --- Makefile | 146 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 73 insertions(+), 73 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 30b83c6..734590b 100644 --- a/Makefile +++ b/Makefile @@ -1,141 +1,141 @@ # -# PHP-CPP Makefile +# PHP-CPP Makefile # -# 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 -# +# 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 +# # -# Zend header files +# Zend header files # -# The variable PHP_DIR contains the location on your system where the regular -# header files of the Zend engine can be found. Usually this is either -# /usr/include/php5 or /usr/local/include/php5. Inside this directory you -# will find sub-directories named TSRM, Zend, ext and main. +# The variable PHP_DIR contains the location on your system where the regular +# header files of the Zend engine can be found. Usually this is either +# /usr/include/php5 or /usr/local/include/php5. Inside this directory you +# will find sub-directories named TSRM, Zend, ext and main. # -PHP_DIR = /usr/include/php5 +PHP_DIR = /usr/include/php5 # -# Installation directory +# Installation directory # -# 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 -# +# 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 -INSTALL_LIB = ${INSTALL_PREFIX}/lib +INSTALL_PREFIX = /usr +INSTALL_HEADERS = ${INSTALL_PREFIX}/include +INSTALL_LIB = ${INSTALL_PREFIX}/lib # -# Name of the target library name +# Name of the target library name # -# The PHP-CPP library will be installed on your system as libphpcpp.so. -# This is a brilliant name. If you want to use a different name for it, -# you can change that here +# The PHP-CPP library will be installed on your system as libphpcpp.so. +# This is a brilliant name. If you want to use a different name for it, +# you can change that here # -RESULT = libphpcpp.so +RESULT = libphpcpp.so # -# Compiler +# 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 (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. +# 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 (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. # -COMPILER = g++ -LINKER = g++ +COMPILER = g++ +LINKER = g++ # -# Compiler flags +# 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 -# 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). +# 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 -I. -I${PHP_DIR} -I${PHP_DIR}/main -I${PHP_DIR}/ext -I${PHP_DIR}/Zend -I${PHP_DIR}/TSRM -O2 -std=c++11 -fpic -o +COMPILER_FLAGS = -Wall -c -I. -I${PHP_DIR} -I${PHP_DIR}/main -I${PHP_DIR}/ext -I${PHP_DIR}/Zend -I${PHP_DIR}/TSRM -g -std=c++11 -fpic -o # -# Linker flags +# Linker flags # -# Just like the compiler, the linker can have flags too. The default flag -# is probably the only one you need. +# Just like the compiler, the linker can have flags too. The default flag +# is probably the only one you need. # -LINKER_FLAGS = -shared +LINKER_FLAGS = -shared # -# Command to remove files, copy files and create directories. +# Command to remove files, copy files and create directories. # -# I've never encountered a *nix environment in which these commands do not work. -# So you can probably leave this as it is +# I've never encountered a *nix environment in which these commands do not work. +# So you can probably leave this as it is # -RM = rm -f -CP = cp -f -MKDIR = mkdir -p +RM = rm -f +CP = cp -f +MKDIR = mkdir -p # -# The source files +# The source files # -# For this we use a special Makefile function that automatically scans the -# src/ directory for all *.cpp files. No changes are probably necessary here +# For this we use a special Makefile function that automatically scans the +# src/ directory for all *.cpp files. No changes are probably necessary here # -SOURCES = $(wildcard src/*.cpp) +SOURCES = $(wildcard src/*.cpp) # -# The object files +# 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 shared library. -# We also use a Makefile function here that takes all source files. +# The intermediate object files are generated by the compiler right before +# the linker turns all these object files into the libphpcpp.so shared library. +# We also use a Makefile function here that takes all source files. # -OBJECTS = $(SOURCES:%.cpp=%.o) +OBJECTS = $(SOURCES:%.cpp=%.o) # -# End of the variables section. Here starts the list of instructions and -# dependencies that are used by the compiler. +# End of the variables section. Here starts the list of instructions and +# dependencies that are used by the compiler. # -all: ${OBJECTS} ${RESULT} +all: ${OBJECTS} ${RESULT} ${RESULT}: ${OBJECTS} - ${LINKER} ${LINKER_FLAGS} -o $@ ${OBJECTS} + ${LINKER} ${LINKER_FLAGS} -o $@ ${OBJECTS} clean: - ${RM} ${OBJECTS} ${RESULT} + ${RM} ${OBJECTS} ${RESULT} ${OBJECTS}: - ${COMPILER} ${COMPILER_FLAGS} $@ ${@:%.o=%.cpp} + ${COMPILER} ${COMPILER_FLAGS} $@ ${@:%.o=%.cpp} install: - ${MKDIR} ${INSTALL_HEADERS}/phpcpp - ${CP} phpcpp.h ${INSTALL_HEADERS} - ${CP} include/*.h ${INSTALL_HEADERS}/phpcpp - ${CP} ${RESULT} ${INSTALL_LIB} + ${MKDIR} ${INSTALL_HEADERS}/phpcpp + ${CP} phpcpp.h ${INSTALL_HEADERS} + ${CP} include/*.h ${INSTALL_HEADERS}/phpcpp + ${CP} ${RESULT} ${INSTALL_LIB} -- cgit v1.2.3