1 #############################################################
5 #############################################################
7 PHP_SOURCE
:=php-
$(PHP_VER
).
tar.bz2
8 PHP_SITE
:=http
://us.php.net
/get/${PHP_SOURCE}/from
/us2.php.net
/mirror
9 PHP_DIR
:=$(BUILD_DIR
)/php-
$(PHP_VER
)
14 ifneq ($(BR2_PACKAGE_PHP_CLI
),y
)
15 PHP_CLI
="--disable-cli"
17 PHP_CLI
="--enable-cli"
18 PHP_TARGET_DEPS
+=$(TARGET_DIR
)/usr
/bin
/php
21 ifneq ($(BR2_PACKAGE_PHP_CGI
),y
)
25 PHP_TARGET_DEPS
+=$(TARGET_DIR
)/usr
/bin
/php-cgi
26 ifeq ($(BR2_PACKAGE_PHP_FASTCGI
),y
)
27 PHP_CGI
+=--enable-fastcgi
31 ifeq ($(BR2_PACKAGE_PHP_OPENSSL
),y
)
32 PHP_OPENSSL
="--with-openssl=$(STAGING_DIR)/usr"
36 ifeq ($(BR2_PACKAGE_PHP_XML2
),y
)
37 PHP_XML
=--enable-libxml \
38 --with-libxml-dir
=${STAGING_DIR}/usr \
45 ifeq ($(BR2_PACKAGE_PHP_ZLIB
),y
)
46 PHP_ZLIB
="--with-zlib=$(STAGING_DIR)/usr"
51 $(DL_DIR
)/$(PHP_SOURCE
):
52 $(WGET
) -P
$(DL_DIR
) $(PHP_SITE
)
54 php-source
: $(DL_DIR
)/$(PHP_SOURCE
)
56 $(PHP_DIR
)/.unpacked
: $(DL_DIR
)/$(PHP_SOURCE
)
57 $(PHP_CAT
) $(DL_DIR
)/$(PHP_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
60 $(PHP_DIR
)/.configured
: $(PHP_DIR
)/.unpacked
61 (cd
$(PHP_DIR
); rm -rf config.cache
; \
62 $(TARGET_CONFIGURE_OPTS
) \
63 $(TARGET_CONFIGURE_ARGS
) \
66 --target
=$(GNU_TARGET_NAME
) \
67 --host
=$(GNU_TARGET_NAME
) \
68 --build
=$(GNU_HOST_NAME
) \
73 --libexecdir
=/usr
/lib \
75 --with-config-file-path
=/etc \
76 --datadir=/usr
/share
/misc \
77 --localstatedir
=/var \
97 $(PHP_DIR
)/.built
: $(PHP_DIR
)/.configured
98 $(MAKE
) CC
=$(TARGET_CC
) -C
$(PHP_DIR
)
101 $(PHP_DIR
)/.staged
: $(PHP_DIR
)/.built
102 $(MAKE
) DESTDIR
=$(STAGING_DIR
) INSTALL_ROOT
=$(STAGING_DIR
) CC
=$(TARGET_CC
) -C
$(PHP_DIR
) install
105 $(TARGET_DIR
)/usr
/bin
/php
: $(PHP_DIR
)/.staged
106 cp
-dpf
$(STAGING_DIR
)/usr
/bin
/php
$(TARGET_DIR
)/usr
/bin
/php
107 chmod
755 $(TARGET_DIR
)/usr
/bin
/php
108 $(STRIPCMD
) $(STRIP_STRIP_UNNEEDED
) $(TARGET_DIR
)/usr
/bin
/php
110 $(TARGET_DIR
)/usr
/bin
/php-cgi
: $(PHP_DIR
)/.staged
111 cp
-dpf
$(STAGING_DIR
)/usr
/bin
/php-cgi
$(TARGET_DIR
)/usr
/bin
/php-cgi
112 chmod
755 $(TARGET_DIR
)/usr
/bin
/php-cgi
113 $(STRIPCMD
) $(STRIP_STRIP_UNNEEDED
) $(TARGET_DIR
)/usr
/bin
/php-cgi
115 $(TARGET_DIR
)/etc
/php.ini
: $(PHP_DIR
)/.staged
116 cp
-f
$(PHP_DIR
)/php.ini-dist
$(TARGET_DIR
)/etc
/php.ini
118 php
: uclibc
$(PHP_DEPS
) $(PHP_TARGET_DEPS
) $(TARGET_DIR
)/etc
/php.ini
121 rm -f
$(PHP_DIR
)/.configured
$(PHP_DIR
)/.built
$(PHP_DIR
)/.staged
122 rm -f
$(TARGET_DIR
)/usr
/bin
/php
$(TARGET_DIR
)/usr
/bin
/php-cgi
123 rm -f
$(STAGING_DIR
)/usr
/bin
/php
* $(STAGING_DIR
)/usr
/man
/man1
/php
*
124 rm -rf
$(STAGING_DIR
)/usr
/include/php
125 -$(MAKE
) -C
$(PHP_DIR
) clean
130 #############################################################
132 # Toplevel Makefile options
134 #############################################################
135 ifeq ($(BR2_PACKAGE_PHP
),y
)