xref: /php-src/win32/build/Makefile.phpize (revision c643cbf3)
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
45!if $(PHP_TEST_INI_PATH) == ""
46test: set-tmp-env
47	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(PHP_PREFIX)\php.exe" -d open_basedir= -d output_buffering=0 run-tests.php -p "$(PHP_PREFIX)\php.exe" -d extension=$(BUILD_DIR)\$(_EXTENSION_DLL) $(TESTS)
48
49run: set-tmp-env
50	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(PHP_PREFIX)\php.exe" -n -d extension=$(BUILD_DIR)\\$(_EXTENSION_DLL) $(ARGS)
51!else
52test: set-tmp-env
53	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(PHP_PREFIX)\php.exe" -n -d open_basedir= -d output_buffering=0 -d memory_limit=-1 run-tests.php -p "$(PHP_PREFIX)\php.exe" -n -c $(PHP_TEST_INI_PATH) $(TESTS)
54
55run: set-tmp-env
56	$(DEBUGGER_CMD) $(DEBUGGER_ARGS) "$(PHP_PREFIX)\php.exe" -n -c $(PHP_TEST_INI_PATH) $(ARGS)
57!endif
58
59!if $(MT) == ""
60_VC_MANIFEST_EMBED_EXE=
61_VC_MANIFEST_EMBED_DLL=
62!else
63_VC_MANIFEST_EMBED_EXE= if exist $@.manifest $(MT) -nologo -manifest $@.manifest -outputresource:$@;1
64_VC_MANIFEST_EMBED_DLL= if exist $@.manifest $(MT) -nologo -manifest $@.manifest -outputresource:$@;2
65!endif
66
67install: build-headers  build-bins
68