1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
# **********************************************************************
#
# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************
#
# Select an installation base directory. The directory will be created
# if it does not exist.
#
prefix ?= /opt/Ice-$(VERSION)
#
# The "root directory" for runpath embedded in executables. Can be unset
# to avoid adding a runpath to Ice executables.
#
embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)
#
# Define OPTIMIZE as yes if you want to build with optimization.
# Otherwise the Ice extension is built with debug information.
#
#OPTIMIZE = yes
#
# Define LP64 as yes if you want to build in 64 bit mode on a platform
# that supports both 32 and 64 bit.
#
#LP64 := yes
#
# The values below can be overridden by defining them as environment
# variables.
#
#
# If you've built PHP yourself then set PHP_HOME to contain the
# installation directory; the rest of the PHP-related settings
# should be correct.
#
# If you've installed a distribution, or PHP was included with
# your system, then you likely need to review the values of
# PHP_INCLUDE_DIR and PHP_LIB_DIR.
#
PHP_HOME ?= /opt/php
#
# Verifies the PHP_HOME is valid and attempts to adjust for platform variances
# in install directories. SuSE installs into 'php5' while Redhat installs to
# php.
#
ifeq ($(shell test -d $(PHP_HOME) && echo 0),0)
ifeq ($(shell test -d $(PHP_HOME)/include/php5 && echo 0),0)
PHP_INCLUDE_DIR = $(PHP_HOME)/include/php5
PHP_LIB_DIR = $(PHP_HOME)/lib$(lp64suffix)/php5
else
PHP_INCLUDE_DIR = $(PHP_HOME)/include/php
PHP_LIB_DIR = $(PHP_HOME)/lib$(lp64suffix)/php
endif
else
ifeq ($(shell test -d /usr/include/php5 && echo 0),0)
PHP_INCLUDE_DIR = /usr/include/php5
PHP_LIB_DIR = /usr/lib$(lp64suffix)/php5
else
PHP_INCLUDE_DIR = /usr/include/php
PHP_LIB_DIR = /usr/lib$(lp64suffix)/php
endif
endif
PHP_FLAGS ?= -I$(PHP_INCLUDE_DIR) -I$(PHP_INCLUDE_DIR)/main -I$(PHP_INCLUDE_DIR)/Zend -I$(PHP_INCLUDE_DIR)/TSRM
# ----------------------------------------------------------------------
# Don't change anything below this line!
# ----------------------------------------------------------------------
#
# Common definitions
#
ice_language = php
ice_require_cpp = yes
slice_translator = slice2cpp
ifeq ($(shell test -f $(top_srcdir)/config/Make.common.rules && echo 0),0)
include $(top_srcdir)/config/Make.common.rules
else
include $(top_srcdir)/../config/Make.common.rules
endif
libdir = $(top_srcdir)/lib
install_libdir = $(prefix)/$(libsubdir)
#
# Platform specific definitions
#
ifeq ($(shell test -f $(top_srcdir)/config/Make.rules.$(UNAME) && echo 0),0)
configdir = $(top_srcdir)/config
else
configdir = $(top_srcdir)/../cpp/config
endif
include $(configdir)/Make.rules.$(UNAME)
ifdef ice_src_dist
ifeq ($(ice_cpp_dir), $(ice_dir)/cpp)
ICE_LIB_DIR = -L$(ice_cpp_dir)/lib
else
ICE_LIB_DIR = -L$(ice_cpp_dir)/$(libsubdir)
endif
ICE_FLAGS = -I$(ice_cpp_dir)/include
endif
ifdef ice_bin_dist
ICE_LIB_DIR = -L$(ice_dir)/lib$(lp64suffix)
ICE_FLAGS = -I$(ice_dir)/include
endif
ICE_LIBS = $(ICE_LIB_DIR) -lIce -lSlice -lIceUtil
ifneq ($(embedded_runpath_prefix),)
runpath_libdir := $(embedded_runpath_prefix)/lib$(lp64suffix)
endif
CPPFLAGS =
ICECPPFLAGS = -I$(slicedir)
LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
ifeq ($(installphplib),)
installphplib = $(INSTALL) $(1) $(2); \
chmod a+rx $(2)/$(notdir $(1))
endif
#
# We don't need the "lib" prefix.
#
mkphplibname = $(subst lib,,$(call mklibname,$(1)))
EVERYTHING = all depend clean install
.SUFFIXES:
.SUFFIXES: .cpp .o .py
all:: $(SRCS)
.cpp.o:
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
clean::
-rm -f $(TARGETS)
-rm -f core *.o *.bak
all:: $(SRCS) $(TARGETS)
depend:: $(SRCS) $(SLICE_SRCS)
-rm -f .depend
if test -n "$(SRCS)" ; then \
$(CXX) -DMAKEDEPEND -M $(CXXFLAGS) $(CPPFLAGS) $(SRCS) | $(ice_dir)/config/makedepend.py >> .depend; \
fi
ifneq ($(TEMPLATE_REPOSITORY),)
clean::
rm -fr $(TEMPLATE_REPOSITORY)
endif
install::
|