1# 2# Copyright (c) ZeroC, Inc. All rights reserved. 3# 4 5top_srcdir := .. 6lang_srcdir := $(top_srcdir)/$(notdir $(patsubst %/,%,$(dir $(lastword $(abspath $(MAKEFILE_LIST)))))) 7 8include $(top_srcdir)/config/Make.rules 9 10# 11# Load C++ dependencies 12# 13#$(eval $(call load-translator-dependencies,$(top_srcdir)/cpp/src/slice2php)) 14#$(eval $(call load-dependencies,$(addprefix $(top_srcdir)/cpp/src/,Ice IceSSL IceDiscovery IceLocatorDiscovery))) 15 16# 17# Load php rules after loading C++ dependencies 18# 19include $(lang_srcdir)/config/Make.rules 20 21ifeq ($(filter all php,$(ICE_BIN_DIST)),) 22 23# 24# Load Makefile.mk fragments 25# 26ifeq ($(filter tests,$(MAKECMDGOALS)),) 27 ifeq ($(shell [ $$($(PHP_CONFIG) --vernum) -lt 70000 ] && echo 0),0) 28 include $(lang_srcdir)/src/php5/Makefile.mk 29 else 30 include $(lang_srcdir)/src/php7/Makefile.mk 31 endif 32endif 33 34# 35# Make the projects (this expands all the build configuration and defines rules for all 36# the components). 37# 38$(call make-projects,$(projects)) 39 40install:: | $(DESTDIR)$(install_phpdir) 41 $(E) "Installing generated code" 42 $(Q)install -m 0644 lib/Glacier2.php lib/IceBox.php lib/IceGrid.php lib/IcePatch2.php lib/IceStorm.php $(DESTDIR)$(install_phpdir) 43ifeq ($(USE_NAMESPACES),no) 44 $(Q)install -m 0644 lib/Ice_no_ns.php $(DESTDIR)$(install_phpdir)/Ice.php 45else 46 $(Q)install -m 0644 lib/Ice_ns.php $(DESTDIR)$(install_phpdir)/Ice.php 47endif 48 49$(eval $(call make-php-package,$(slicedir),lib,Ice)) 50$(eval $(call make-php-package,$(slicedir),lib,Glacier2)) 51$(eval $(call make-php-package,$(slicedir),lib,IceBox)) 52$(eval $(call make-php-package,$(slicedir),lib,IceGrid)) 53$(eval $(call make-php-package,$(slicedir),lib,IcePatch2)) 54$(eval $(call make-php-package,$(slicedir),lib,IceStorm)) 55 56endif 57 58# 59# Translate the Slice files from test directories 60# 61tests := $(call tests-without-project-makefile,php) 62include $(shell find test -name Makefile.mk) 63$(foreach t,$(tests),$(eval $(call make-php-test-project,$(t)))) 64