xref: /PHP-7.4/win32/build/Makefile (revision f34db7fc)
105b9b20eSWez Furlong#  +----------------------------------------------------------------------+
2d0cb7153SJohannes Schlüter#  | PHP Version 7                                                        |
305b9b20eSWez Furlong#  +----------------------------------------------------------------------+
40cf7de1cSZeev Suraski#  | Copyright (c) The PHP Group                                          |
505b9b20eSWez Furlong#  +----------------------------------------------------------------------+
6251c5173Sfoobar#  | This source file is subject to version 3.01 of the PHP license,      |
705b9b20eSWez Furlong#  | that is bundled with this package in the file LICENSE, and is        |
805b9b20eSWez Furlong#  | available through the world-wide-web at the following url:           |
9251c5173Sfoobar#  | http://www.php.net/license/3_01.txt                                  |
1005b9b20eSWez Furlong#  | If you did not receive a copy of the PHP license and are unable to   |
1105b9b20eSWez Furlong#  | obtain it through the world-wide-web, please send a note to          |
1205b9b20eSWez Furlong#  | license@php.net so we can mail you a copy immediately.               |
1305b9b20eSWez Furlong#  +----------------------------------------------------------------------+
1405b9b20eSWez Furlong#  | Author: Wez Furlong <wez@thebrainroom.com>                           |
1505b9b20eSWez Furlong#  +----------------------------------------------------------------------+
1605b9b20eSWez Furlong#
1705b9b20eSWez Furlong# This is the makefile template for the win32 build
1805b9b20eSWez Furlong
197dd694ecSPierre JoyeCC="$(PHP_CL)"
2005b9b20eSWez FurlongLD="$(LINK)"
212c9d87c2SWez FurlongMC="$(MC)"
22d39271c0SEdin KadribasicMT="$(MT)"
2356352d1aSScott MacVicarRE2C="$(RE2C)"
24612e73b0SPierre JoyePGOMGR="$(PGOMGR)"
25a2e64a99SPierre JoyePHP_BUILD=$(PHP_BUILD)
2605b9b20eSWez Furlong
27c7dc6cc6SAnatol Belski!if "$(PHP_SIMD_SCALE)" == ""
2810549ac6SAnatol BelskiSIMD_SUFFIX=
29c7dc6cc6SAnatol Belski!else
30c7dc6cc6SAnatol Belski!if "$(PHP_SIMD_SCALE)" == "SSE2"
3110549ac6SAnatol BelskiSIMD_SUFFIX=
32c7dc6cc6SAnatol Belski!else
33c7dc6cc6SAnatol BelskiSIMD_SUFFIX=-$(PHP_SIMD_SCALE)
34c7dc6cc6SAnatol Belski!endif
35c7dc6cc6SAnatol Belski!endif
36c7dc6cc6SAnatol Belski
371cdf5b7bSAnatol Belski!if "$(PKG_SUFFIX)" != ""
381cdf5b7bSAnatol BelskiPKG_SUFFIX_PART=-$(PKG_SUFFIX)
391cdf5b7bSAnatol Belski!endif
401cdf5b7bSAnatol Belski
41d898a741SWez FurlongMCFILE=$(BUILD_DIR)\wsyslog.rc
421cdf5b7bSAnatol BelskiBUILD_DIR_DEV_NAME=php-$(PHP_VERSION_STRING)-devel-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE)$(SIMD_SUFFIX)$(PKG_SUFFIX_PART)
43e79ed635SPierre JoyeBUILD_DIR_DEV=$(BUILD_DIR)\$(BUILD_DIR_DEV_NAME)
442a90ba36SWez Furlong
451cdf5b7bSAnatol BelskiDIST_ZIP_SNAP=php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE)$(SIMD_SUFFIX)$(PKG_SUFFIX_PART).zip
461cdf5b7bSAnatol BelskiDIST_ZIP_PECL=pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE)$(SIMD_SUFFIX)$(PKG_SUFFIX_PART).zip
471cdf5b7bSAnatol BelskiDIST_ZIP_DEV_PACK=php-devel-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE)$(SIMD_SUFFIX)$(PKG_SUFFIX_PART).zip
481cdf5b7bSAnatol BelskiDIST_ZIP_TEST_PACK=php-test-pack-$(PHP_VERSION_STRING)$(SIMD_SUFFIX)$(PKG_SUFFIX_PART).zip
491cdf5b7bSAnatol BelskiDIST_ZIP_DEBUG_PACK=php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE)$(SIMD_SUFFIX)$(PKG_SUFFIX_PART).zip
502b37da9eSAnatol Belski
519450e23bSAnatol Belski!if "$(DEBUGGER)" == "1"
529450e23bSAnatol BelskiDEBUGGER_CMD=devenv
539450e23bSAnatol BelskiDEBUGGER_ARGS=/debugexe
549450e23bSAnatol Belski!else
559450e23bSAnatol BelskiDEBUGGER_CMD=
569450e23bSAnatol BelskiDEBUGGER_ARGS=
579450e23bSAnatol Belski!endif
589450e23bSAnatol Belski
592a90ba36SWez Furlongall: generated_files $(EXT_TARGETS) $(PECL_TARGETS) $(SAPI_TARGETS)
6005b9b20eSWez Furlong
61e79ed635SPierre Joyebuild_dirs: $(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV)
62f93193ccSWez Furlong
6356352d1aSScott MacVicar!if $(RE2C) == ""
6456352d1aSScott MacVicargenerated_files: build_dirs Zend\zend_ini_parser.c \
6556352d1aSScott MacVicar	Zend\zend_language_parser.c \
66b6bcf9c5SChristoph M. Becker	sapi\phpdbg\phpdbg_parser.c \
6756352d1aSScott MacVicar	$(PHPDEF) $(MCFILE)
6856352d1aSScott MacVicar!else
69f93193ccSWez Furlonggenerated_files: build_dirs Zend\zend_ini_parser.c \
7005b9b20eSWez Furlong	Zend\zend_language_parser.c Zend\zend_ini_scanner.c \
7105b9b20eSWez Furlong	Zend\zend_language_scanner.c \
72b6bcf9c5SChristoph M. Becker	sapi\phpdbg\phpdbg_parser.c sapi\phpdbg\phpdbg_lexer.c \
732a90ba36SWez Furlong	$(PHPDEF) $(MCFILE)
7456352d1aSScott MacVicar!endif
7505b9b20eSWez Furlong
76a3075773SWez Furlong$(BUILD_DIR)\$(PHPDLL).def: $(PHP_DLL_DEF_SOURCES)
77a3075773SWez Furlong	type $(PHP_DLL_DEF_SOURCES) > $(BUILD_DIR)\$(PHPDLL).def
7805b9b20eSWez Furlong
7905b9b20eSWez FurlongZend\zend_ini_parser.c Zend\zend_ini_parser.h: Zend\zend_ini_parser.y
80a3075773SWez Furlong	$(BISON) --output=Zend/zend_ini_parser.c -v -d -p ini_ Zend/zend_ini_parser.y
8105b9b20eSWez Furlong
8205b9b20eSWez FurlongZend\zend_language_parser.c Zend\zend_language_parser.h: Zend\zend_language_parser.y
83a3075773SWez Furlong	$(BISON) --output=Zend/zend_language_parser.c -v -d -p zend Zend/zend_language_parser.y
8462bed405SAnatol Belski	@if "$(SED)" neq "" $(SED) -i "s,^int zendparse\(.*\),ZEND_API int zendparse\1,g" Zend/zend_language_parser.c
8562bed405SAnatol Belski	@if "$(SED)" neq "" $(SED) -i "s,^int zendparse\(.*\),ZEND_API int zendparse\1,g" Zend/zend_language_parser.h
8662bed405SAnatol Belski	@if "$(SED)" neq "" $(SED) -i "s,^#ifndef YYTOKENTYPE,#include \"zend.h\"\n#ifndef YYTOKENTYPE,g" Zend/zend_language_parser.h
8705b9b20eSWez Furlong
88b6bcf9c5SChristoph M. Beckersapi\phpdbg\phpdbg_parser.c sapi\phpdbg\phpdbg_parser.h: sapi\phpdbg\phpdbg_parser.y
89b6bcf9c5SChristoph M. Becker	$(BISON) --output=sapi/phpdbg/phpdbg_parser.c -v -d -p phpdbg_ sapi/phpdbg/phpdbg_parser.y
9037c329d7SPeter Kokot
9156352d1aSScott MacVicar!if $(RE2C) != ""
92e11233dcSJoe WatkinsZend\zend_ini_scanner.c: Zend\zend_ini_scanner.l
93e11233dcSJoe Watkins	$(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_ini_scanner_defs.h -oZend/zend_ini_scanner.c Zend/zend_ini_scanner.l
9405b9b20eSWez Furlong
95e11233dcSJoe WatkinsZend\zend_language_scanner.c: Zend\zend_language_scanner.l
96e11233dcSJoe Watkins	$(RE2C) $(RE2C_FLAGS) --no-generation-date --case-inverted -cbdFt Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c Zend/zend_language_scanner.l
9737c329d7SPeter Kokot
98e11233dcSJoe Watkinssapi\phpdbg\phpdbg_lexer.c: sapi\phpdbg\phpdbg_lexer.l
99e11233dcSJoe Watkins	$(RE2C) $(RE2C_FLAGS) --no-generation-date -cbdFo sapi/phpdbg/phpdbg_lexer.c sapi/phpdbg/phpdbg_lexer.l
10056352d1aSScott MacVicar!endif
10105b9b20eSWez Furlong
102ba59b6f1SAnatol Belski!if "$(ZTS)" == "1"
103ba59b6f1SAnatol BelskiPHP7_PGD_SUFFIX=ts
104ba59b6f1SAnatol Belski!else
105ba59b6f1SAnatol BelskiPHP7_PGD_SUFFIX=
106ba59b6f1SAnatol Belski!endif
107ba59b6f1SAnatol Belski
108612e73b0SPierre Joye!if $(PGOMGR) != ""
109ba59b6f1SAnatol BelskiPHP7_PGD_OPTION=/PGD:$(PGOPGD_DIR)\php7$(PHP7_PGD_SUFFIX).pgd
110612e73b0SPierre Joye!else
111cf0303e7SFlorian MARGAINEPHP7_PGD_OPTION=
112612e73b0SPierre Joye!endif
113612e73b0SPierre Joye
114fb842592SWez FurlongPHPDLL_RES=$(BUILD_DIR)\$(PHPDLL).res
115c2bd62fcSWez Furlong
1162c9d87c2SWez Furlong$(MCFILE): win32\build\wsyslog.mc
1172c9d87c2SWez Furlong	$(MC) -h win32\ -r $(BUILD_DIR)\ -x $(BUILD_DIR)\ win32\build\wsyslog.mc
118d898a741SWez Furlong
119d898a741SWez Furlong#	$(RC) /fo $(MCFILE) $(BUILD_DIR)\wsyslog.rc
1202c9d87c2SWez Furlong
12100b5f0d0SFrank M. Kromann!if $(MT) == ""
12200b5f0d0SFrank M. Kromann_VC_MANIFEST_EMBED_EXE=
12300b5f0d0SFrank M. Kromann_VC_MANIFEST_EMBED_DLL=
12400b5f0d0SFrank M. Kromann!else
1252bdf721fSEdin Kadribasic_VC_MANIFEST_EMBED_EXE= if exist $@.manifest $(MT) -nologo -manifest $@.manifest -outputresource:$@;1
1262bdf721fSEdin Kadribasic_VC_MANIFEST_EMBED_DLL= if exist $@.manifest $(MT) -nologo -manifest $@.manifest -outputresource:$@;2
12700b5f0d0SFrank M. Kromann!endif
128d39271c0SEdin Kadribasic
129fb842592SWez Furlong$(PHPDLL_RES): win32\build\template.rc
130164167f3SAnatol Belski	$(RC) /nologo /fo $(PHPDLL_RES) /d FILE_DESCRIPTION="\"PHP Script Interpreter\"" \
131fb842592SWez Furlong		/d FILE_NAME="\"$(PHPDLL)\"" /d PRODUCT_NAME="\"PHP Script Interpreter\"" \
132d898a741SWez Furlong		/I$(BUILD_DIR) /d MC_INCLUDE="\"$(MCFILE)\"" \
1339a7b2f0bSSteph Fox		win32\build\template.rc
134fb842592SWez Furlong
135afcd94f2SEdin Kadribasic$(BUILD_DIR)\$(PHPDLL): generated_files $(PHPDEF) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(PHPDLL_RES) $(MCFILE)
13609354630SKalle Sommer Nielsen	@copy win32\build\default.manifest $(BUILD_DIR)\$(PHPDLL).manifest >nul
1371310bb5eSAnatol Belski#	@$(CC) $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES) /link /out:$(BUILD_DIR)\$(PHPDLL) $(PHP7_PGD_OPTION) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS)
1381acbcdebSAnatol Belski	@"$(LINK)" $(PHP_GLOBAL_OBJS_RESP) $(STATIC_EXT_OBJS_RESP) $(STATIC_EXT_LIBS) $(LIBS) $(PHPDLL_RES) /out:$(BUILD_DIR)\$(PHPDLL) $(PHP7_PGD_OPTION) $(PHP_LDFLAGS) $(LDFLAGS) $(STATIC_EXT_LDFLAGS)
139d39271c0SEdin Kadribasic	-@$(_VC_MANIFEST_EMBED_DLL)
1409a7b2f0bSSteph Fox
14105b9b20eSWez Furlong$(BUILD_DIR)\$(PHPLIB): $(BUILD_DIR)\$(PHPDLL)
1429a7b2f0bSSteph Fox
143e79ed635SPierre Joye$(BUILD_DIR) $(BUILD_DIRS_SUB) $(BUILD_DIR_DEV):
144a3075773SWez Furlong	@echo Recreating build dirs
145a3075773SWez Furlong	@if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)
146b25ded66SPierre Joye	@cd $(BUILD_DIR)
147a3075773SWez Furlong	@for %D in ($(BUILD_DIRS_SUB)) do @if not exist %D @mkdir %D > NUL
148e79ed635SPierre Joye	@if not exist $(BUILD_DIR_DEV) @mkdir $(BUILD_DIR_DEV) > NUL
149f093c7dbSMoriyoshi Koizumi	@cd "$(PHP_SRC_DIR)"
15037c329d7SPeter Kokot
15105b9b20eSWez Furlong
152a93d20b4SWez Furlongclean-sapi:
153a3075773SWez Furlong	@echo Cleaning SAPI
15408a1b6c4SWez Furlong	@for %D in (_x $(EXT_TARGETS)) do @if exist $(BUILD_DIR)\%D @del /F /Q $(BUILD_DIR)\%D > NUL
15508a1b6c4SWez Furlong	@for %D in (_x $(PECL_TARGETS)) do @if exist $(BUILD_DIR)\%D @del /F /Q $(BUILD_DIR)\%D > NUL
15608a1b6c4SWez Furlong	@for %D in (_x $(SAPI_TARGETS)) do @if exist $(BUILD_DIR)\%D @del /F /Q $(BUILD_DIR)\%D > NUL
15708a1b6c4SWez Furlong	-@del /F /Q $(BUILD_DIR)\$(PHPDLL)
158a93d20b4SWez Furlong
159a93d20b4SWez Furlongclean: clean-sapi
1609a7b2f0bSSteph Fox	@echo Cleaning distribution build dirs
161b25ded66SPierre Joye	@cd $(BUILD_DIR)
1628d9ced82SWez Furlong	@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.* > NUL
163f093c7dbSMoriyoshi Koizumi	@cd "$(PHP_SRC_DIR)"
16429ca3fadSAnatol Belski	-@del /F /Q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.manifest $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\php-$(PHP_VERSION_STRING)-Win32.zip $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)-Win32.zip > NUL
1659a7b2f0bSSteph Fox	-rd /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
16605b9b20eSWez Furlong
16732956a25SWez Furlongclean-pecl:
16832956a25SWez Furlong	@echo Cleaning PECL targets only
1699a7b2f0bSSteph Fox	-rd /s /q $(BUILD_DIR)\pecl
1709a7b2f0bSSteph Fox
1719a7b2f0bSSteph Foxclean-all:
1729a7b2f0bSSteph Fox	@echo Cleaning standard build dirs
173b25ded66SPierre Joye	@cd $(BUILD_DIR)
1749a7b2f0bSSteph Fox	@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @rd /s /q %D
175f093c7dbSMoriyoshi Koizumi	@cd "$(PHP_SRC_DIR)"
176612e73b0SPierre Joye	-@del /f /q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\*.rc $(BUILD_DIR)\*.manifest $(BUILD_DIR)\*.dbg $(BUILD_DIR)\*.bin $(BUILD_DIR)\php*.dll $(BUILD_DIR)\php*.exe > NUL
177612e73b0SPierre Joye
178612e73b0SPierre Joyeclean-pgo: clean-all
179612e73b0SPierre Joye	-rd /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
180612e73b0SPierre Joye	-rd /s /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
181612e73b0SPierre Joye	-rd /s /q $(BUILD_DIR)\php-test-pack-$(PHP_VERSION_STRING)
1822b37da9eSAnatol Belski	-del /f /q $(BUILD_DIR)\$(DIST_ZIP_SNAP)
1832b37da9eSAnatol Belski	-del /f /q $(BUILD_DIR)\$(DIST_ZIP_DEBUG_PACK)
1842b37da9eSAnatol Belski	-del /f /q $(BUILD_DIR)\$(DIST_ZIP_PECL)
1852b37da9eSAnatol Belski	-del /f /q $(BUILD_DIR)\$(DIST_ZIP_TEST_PACK)
18632956a25SWez Furlong
1879450e23bSAnatol Belski
1885b04a218SAnatol Belski!if $(PHP_TEST_INI_PATH) == ""
18978a164baSAnatol Belskitest: set-tmp-env
1909450e23bSAnatol Belski	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(BUILD_DIR)\php.exe" -d open_basedir= -d output_buffering=0 run-tests.php $(TESTS) -p "$(BUILD_DIR)\php.exe"
191197def72SAnatol Belski
192197def72SAnatol Belskirun: set-tmp-env
1939450e23bSAnatol Belski	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(BUILD_DIR)\php.exe" $(ARGS)
1945b04a218SAnatol Belski!else
19578a164baSAnatol Belskitest: set-tmp-env
19644b7126cSAnatol Belski	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(BUILD_DIR)\php.exe" -n -d open_basedir= -d output_buffering=0 -d memory_limit=-1 run-tests.php -p "$(BUILD_DIR)\php.exe" -n -c $(PHP_TEST_INI_PATH) $(TESTS)
197197def72SAnatol Belski
198197def72SAnatol Belskirun: set-tmp-env
1999450e23bSAnatol Belski	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(BUILD_DIR)\php.exe" -n -c $(PHP_TEST_INI_PATH) $(ARGS)
2005b04a218SAnatol Belski!endif
2013be2b8d7SWez Furlong
20278a164baSAnatol Belskibuild-snap: set-tmp-env generated_files
203113165bdSWez Furlong	@$(MAKE) "$(BUILD_DIR)\$(PHPDLL)"
20408a1b6c4SWez Furlong	-for %T in ($(SAPI_TARGETS)) do $(MAKE) /I /nologo "%T"
20508a1b6c4SWez Furlong	-for %T in ($(EXT_TARGETS)) do $(MAKE) /I /nologo "%T"
20608a1b6c4SWez Furlong	-for %T in ($(PECL_TARGETS)) do $(MAKE) /I /nologo "%T"
207113165bdSWez Furlong
20803d426f6SWez Furlongbuild-dist: $(BUILD_DIR)\deplister.exe
2099a7b2f0bSSteph Fox	-rd /s /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
2109a7b2f0bSSteph Fox	-rd /s /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
2112b37da9eSAnatol Belski	-del /f /q $(BUILD_DIR)\$(DIST_ZIP_SNAP)
2122b37da9eSAnatol Belski	-del /f /q $(BUILD_DIR)\$(DIST_ZIP_DEBUG_PACK)
2132b37da9eSAnatol Belski	-del /f /q $(BUILD_DIR)\$(DIST_ZIP_PECL)
2148121cb50SAnatol Belski	$(PHP_SDK_PHP_CMD) -d date.timezone=UTC -n -dphar.readonly=0 win32/build/mkdist.php "$(PHP_VERSION_STRING)" "$(BUILD_DIR)" "$(PHP_BUILD)" "$(PHPDLL)" "$(SAPI_TARGETS)" "$(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES)" "$(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES)" "$(SNAPSHOT_TEMPLATE)"
215a3075773SWez Furlong	cd $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
216ff027753SAnatol Belski	-$(7ZA) a ..\$(DIST_ZIP_SNAP) .
2176d131cefSWez Furlong	cd $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)
218ff027753SAnatol Belski	-$(7ZA) a ..\$(DIST_ZIP_PECL) .
219c4b0279bSPierre Joye	cd $(BUILD_DIR)\php-test-pack-$(PHP_VERSION_STRING)
220ff027753SAnatol Belski	-$(7ZA) a ..\$(DIST_ZIP_TEST_PACK) .
221dec1c86aSEdin Kadribasic	cd $(BUILD_DIR)
222ff027753SAnatol Belski	-$(7ZA) a $(DIST_ZIP_DEBUG_PACK) *.pdb
223ff027753SAnatol Belski	-$(7ZA) a $(DIST_ZIP_DEV_PACK) $(BUILD_DIR_DEV_NAME)
224d509e79dSAnatol Belski	cd $(BUILD_DIR)
225a3075773SWez Furlong
226113165bdSWez Furlongdist: all build-dist
227b25ded66SPierre Joyesnap: build-snap build-devel build-dist
228113165bdSWez Furlong
22903d426f6SWez Furlong$(BUILD_DIR)\deplister.exe:	win32\build\deplister.c
2305a3688feSAnatol Belski	$(CC) /nologo /Fo$(BUILD_DIR)\ /Fd$(BUILD_DIR)\ /Fp$(BUILD_DIR)\ /FR$(BUILD_DIR) /Fe$(BUILD_DIR)\deplister.exe win32\build\deplister.c imagehlp.lib
23103d426f6SWez Furlong
232e79ed635SPierre Joyeinstall: really-install install-sdk
233e79ed635SPierre Joye
234c5ccaf1dSAnatol Belskibuild-lib: build-ext-libs
235e79ed635SPierre Joye	@if not exist $(BUILD_DIR_DEV)\lib mkdir $(BUILD_DIR_DEV)\lib >nul
236e79ed635SPierre Joye	@copy $(BUILD_DIR)\$(PHPLIB) $(BUILD_DIR_DEV)\lib /y >nul
237e79ed635SPierre Joye
238e79ed635SPierre Joyebuild-devel: build-headers build-lib
239e79ed635SPierre Joye	@if not exist $(BUILD_DIR_DEV)\script mkdir $(BUILD_DIR_DEV)\script >nul
240e79ed635SPierre Joye	@if not exist $(BUILD_DIR_DEV)\build mkdir $(BUILD_DIR_DEV)\build >nul
2410f9bf85aSy-uti	@copy run-tests.php $(BUILD_DIR_DEV)\script\ /y >nul
242e79ed635SPierre Joye	@copy win32\build\confutils.js $(BUILD_DIR_DEV)\script\ /y >nul
243e79ed635SPierre Joye	@copy win32\build\configure.tail $(BUILD_DIR_DEV)\script\ /y >nul
244e79ed635SPierre Joye	@copy win32\build\config.w32.phpize.in $(BUILD_DIR_DEV)\script\ /y >nul
245e79ed635SPierre Joye	@copy win32\build\Makefile.phpize $(BUILD_DIR_DEV)\script\ /y >nul
246e79ed635SPierre Joye	@copy win32\build\phpize.bat $(BUILD_DIR_DEV)\ /y >nul
247e79ed635SPierre Joye	@copy win32\build\template.rc $(BUILD_DIR_DEV)\build\ /y >nul
24866d57be2SAnatol Belski	@copy win32\build\default.manifest $(BUILD_DIR_DEV)\build\ /y >nul
249e79ed635SPierre Joye	@copy $(BUILD_DIR)\devel\config.phpize.js $(BUILD_DIR_DEV)\script\ /y >nul
250e79ed635SPierre Joye	@copy $(BUILD_DIR)\devel\phpize.js $(BUILD_DIR_DEV)\script\ /y >nul
251f7176f9cSPierre Joye	@copy $(BUILD_DIR)\devel\ext_deps.js $(BUILD_DIR_DEV)\script\ /y >nul
252e79ed635SPierre Joye
253e79ed635SPierre Joyeinstall-sdk: build-devel
254e79ed635SPierre Joye	@xcopy /Q /Y /E /I $(BUILD_DIR_DEV)\* $(PHP_PREFIX)\SDK
2554df03c1dSPierre Joye
2562c9d87c2SWez Furlongreally-install:
2572c3c75aeSWez Furlong	@if not exist $(PHP_PREFIX) mkdir $(PHP_PREFIX)
2582764586cSAnatol Belski	@if not exist $(PHP_PREFIX)\ext mkdir $(PHP_PREFIX)\ext
259b227a512SWez Furlong	@echo Installing files under $(PHP_PREFIX)
2602e77f5eeSDylan K. Taylor	@if exist $(BUILD_DIR)\*.exe copy $(BUILD_DIR)\*.exe $(PHP_PREFIX) /y >nul
26124da62d3SAnatol Belski	@type nul > $(BUILD_DIR)\extension_dlls.txt
2622e77f5eeSDylan K. Taylor	@if exist $(BUILD_DIR)\php_*.dll copy $(BUILD_DIR)\php_*.dll $(PHP_PREFIX)\ext /y >nul & dir /b $(BUILD_DIR)\php_*.dll > $(BUILD_DIR)\extension_dlls.txt
2632764586cSAnatol Belski	@xcopy $(BUILD_DIR)\*.dll /exclude:$(BUILD_DIR)\extension_dlls.txt $(PHP_PREFIX) /y >nul
2646f617b77SChristoph M. Becker	@echo Registering event source with syslog (requires admin rights)
2656f617b77SChristoph M. Becker	@echo It's okay for this step to fail:
2666f617b77SChristoph M. Becker	-$(PHP_PREFIX)\php.exe -n -dextension_dir=$(PHP_PREFIX) win32/build/registersyslog.php $(PHP_PREFIX)\$(PHPDLL)
267*f34db7fcSChristoph M. Becker	-regedit /s win32\syslog.reg
268