xref: /PHP-7.2/win32/build/Makefile.phpize (revision 60a69dae)
1CC="$(PHP_CL)"
2LD="$(LINK)"
3MC="$(MC)"
4MT="$(MT)"
5
6PHPSDK_DIR=$(PHP_DIR)
7PHPLIB=$(PHPSDK_DIR)\lib\$(PHPLIB)
8LDFLAGS=$(LDFLAGS) /libpath:"$(PHPSDK_DIR)\lib\;$(PHPSDK_DIR)"
9BUILD_DIR_DEV=$(PHPSDK_DIR)
10
11!if "$(DEBUGGER)" == "1"
12DEBUGGER_CMD=devenv
13DEBUGGER_ARGS=/debugexe
14!else
15DEBUGGER_CMD=
16DEBUGGER_ARGS=
17!endif
18
19all: $(EXT_TARGETS) $(PECL_TARGETS)
20
21build_dirs: $(BUILD_DIR) $(BUILD_DIRS_SUB)
22
23clean-pecl:
24	@echo Cleaning PECL targets only
25	-rd /s /q $(BUILD_DIR)\pecl
26
27clean-all:
28	@echo Cleaning standard build dirs
29	cd $(BUILD_DIR)
30	@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @rd /s /q %D
31	-@del /f /q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.manifest $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\*.rc $(BUILD_DIR)\*.dbg $(BUILD_DIR)\*.bin $(BUILD_DIR)\php*.dll $(BUILD_DIR)\php*.exe > NUL
32
33clean: clean-pecl
34	@echo Cleaning distribution build dirs
35	cd $(BUILD_DIR)
36	@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.* > NUL
37	-@del /F /Q $(BUILD_DIR)\*.res $(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
38
39!if "$(EXT_TARGETS)" == ""
40_EXTENSION_DLL=$(PECL_TARGETS)
41!else
42_EXTENSION_DLL=$(EXT_TARGETS)
43!endif
44
45test: set-tmp-env
46	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(PHP_PREFIX)\php.exe" -d open_basedir= -d output_buffering=0 run-tests.php $(TESTS) -p "$(PHP_PREFIX)\php.exe" -d extension=$(BUILD_DIR)\$(_EXTENSION_DLL)
47
48run: set-tmp-env
49	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(PHP_PREFIX)\php.exe" -n -d extension=$(BUILD_DIR)\\$(_EXTENSION_DLL) $(ARGS)
50
51!if $(MT) == ""
52_VC_MANIFEST_EMBED_EXE=
53_VC_MANIFEST_EMBED_DLL=
54!else
55_VC_MANIFEST_EMBED_EXE= if exist $@.manifest $(MT) -nologo -manifest $@.manifest -outputresource:$@;1
56_VC_MANIFEST_EMBED_DLL= if exist $@.manifest $(MT) -nologo -manifest $@.manifest -outputresource:$@;2
57!endif
58
59install: build-headers  build-bins
60