-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile.frag.w32
48 lines (38 loc) · 2.01 KB
/
Makefile.frag.w32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
say_warning:
@echo php build system do not support statically build in win32.
@echo try `nmake micro`.
MICRO_SFX = "$(BUILD_DIR)\micro.sfx"
MICRO_EXES = "$(BUILD_DIR)\sapi\micro\tests\simpleecho.exe" "$(BUILD_DIR)\sapi\micro\tests\fakecmd.exe"
_MICRO_RES_BUILD = $(RC) /nologo /n /fo $(BUILD_DIR)\sapi\micro\micro.exe.res \
/d WANT_LOGO \
/d APP_LOGO="\"$(APP_LOGO)\"" \
/d FILE_DESCRIPTION="\"micro.exe\"" \
/d FILE_NAME="\"micro.exe\"" \
/d PRODUCT_NAME="\"PHP Script Interpreter\"" \
/d URL="\"http://www.php.net\"" \
/d INTERNAL_NAME="\"MICRO SAPI\"" \
/d THANKS_GUYS="\"\"" \
$(BASE_INCLUDES) /I$(BUILD_DIR)
MICRO_LINKING_OBJS = $(PHP_GLOBAL_OBJS) $(STATIC_EXT_OBJS) $(MICRO_GLOBAL_OBJS)
MICRO_LINKING_OBJS_RESP = $(PHP_GLOBAL_OBJS_RESP) $(STATIC_EXT_OBJS_RESP) $(MICRO_GLOBAL_OBJS_RESP)
_MICRO_LINKALL = @"$(LINK)" /nologo \
$(MICRO_LINKING_OBJS_RESP) \
$(ASM_OBJS) \
$(STATIC_EXT_LIBS) $(LIBS_MICRO) $(LIBS) \
$(BUILD_DIR)\sapi\micro\micro.exe.res \
/out:$(MICRO_SFX) $(LDFLAGS) $(LDFLAGS_MICRO)
_MICRO_MT = if $(MT) neq "" if exist $(BUILD_DIR)\micro.exe.manifest $(MT) -nologo -manifest $(BUILD_DIR)\micro.exe.manifest -outputresource:$(MICRO_SFX);1
# for 2-step generation
$(MICRO_SFX): generated_files $(MICRO_LINKING_OBJS) $(BUILD_DIR)\micro.exe.manifest
@echo Prebuilding
$(_MICRO_RES_BUILD) sapi\micro\php_micro.rc
@$(_MICRO_LINKALL)
@$(_MICRO_MT)
$(MICRO_EXES): $(MICRO_SFX)
@if not exist "$(BUILD_DIR)\sapi\micro\tests" @mkdir $(BUILD_DIR)\sapi\micro\tests
@for %I in ($@) do copy /b $(MICRO_SFX) + sapi\micro\tests\%~nI.php %I
micro: $(MICRO_SFX)
@echo Done build micro sfx
micro_test: set-tmp-env $(MICRO_SFX) $(MICRO_EXES)
@for /f "tokens=* usebackq" %F IN (`"$(BUILD_DIR)\sapi\micro\tests\simpleecho.exe" nonce world`) do @if not "%F" == "hello world" @echo sanity check for micro.sfx failed, the sfx generated may be corrupt.
@"$(BUILD_DIR)\sapi\micro\tests\fakecmd.exe" -n -d open_basedir= -d output_buffering=0 -d memory_limit=-1 run-tests.php -p "$(BUILD_DIR)\sapi\micro\tests\fakecmd.exe" -n $(TESTS)