windows-nt/Source/XPSP1/NT/base/mvdm/wow16/test/hello/makefile.sub
2020-09-26 16:20:57 +08:00

116 lines
3.1 KiB
Plaintext

# HELLO makefile
#
# Copyright (c) 1991, Microsoft Corporation
#
# History:
# 26-Jan-1991 Matt Felton (mattfe)
# 21-Mar-1992 Matt Felton Code from win 3.1 progman
# Created.
#
LVL_2 = 1
!INCLUDE ..\..\makefile.inc
AOBJ = -W2 -DSEGNAME=COMMAND $(INCS)
!if !$(FREEBUILD)
COBJ = -AS -G2s -Os -W2 -Zp -DDEBUG
CW16 = -AS -G2sw -Os -W2 -Zp -DDEBUG
!else
COBJ = -AS -G2s -Os -W2 -Zp
CW16 = -AS -G2sw -Os -W2 -Zp
!endif
CW16L = $(CW16) -B1 c1l.exe -B2 c2l.exe -B3 c3l.exe
LINKOPTS = /map /stack:8192 /align:16
!if !$(FREEBUILD)
AOBJ = $(AOBJ) -Zd
CW16 = $(CW16) /Od /Oi /Zd
LINKOPTS = $(LINKOPTS) /LI
RCFLAGS = -DDEBUG
!endif
W16LIBS = ..\..\lib\snocrt.lib ..\..\lib\$(ALT_PROJECT)\libw.lib
CW16 =$(CW16) $(DBCS_FLAGS)
AOBJ =$(AOBJ) $(DBCS_FLAGS)
!if "$(ALT_PROJECT)" != "USA"
W16LIBS =$(W16LIBS) ..\..\lib\$(DEST)\winnls.lib
!endif
.h.inc:
h2inc -t $*.h -o $*.inc
.asm.obj:
$(ASM) $(AOBJ) $*;
.asm.lst:
$(ASM) $(AOBJ) -l $*,nul,$*.lst;
.c.obj:
$(CL) -c -nologo $(CW16) $*.c
.c.lst:
$(CL) -c -nologo $(CW16) -Fonul -Fc$*.lst $*.c
.def.lib:
implib $*.lib $*.def
all: $(DEST)\hello.exe $(DEST)\hello.sym
binplace -o $(ALT_PROJECT_TARGET) $(DEST)\hello.exe $(DEST)\hello.map $(DEST)\hello.sym
clean: cleanup all
cleanup:
if exist *.def del *.def
cd $(DEST)
if exist *.lrf del *.lrf
if exist *.def del *.def
if exist *.obj del *.obj
if exist *.exe del *.exe
if exist *.map del *.map
if exist *.sym del *.sym
if exist *.res del *.res
cd ..\..\..
$(DEST)\hello.obj:hello.c ..\..\..\inc\wowinfo.h
@set include=$(ENVINCS);$(INCLUDE)
$(CL) -c -nologo $(CW16) -Fo$*.obj $(*F).c
$(DEST)\hello.lrf: makefile.sub
echo $(DEST)\hello.obj >$(DEST)\hello.lrf
echo $(DEST)\hello $(LINKOPTS)>>$(DEST)\hello.lrf
echo $(DEST)\hello>>$(DEST)\hello.lrf
echo $(W16LIBS) /batch /nod>>$(DEST)\hello.lrf
echo $(DEST)\hello.def;>>$(DEST)\hello.lrf
$(DEST)\hello.def: makefile.sub
echo name hello >$(DEST)\hello.def
echo exetype windows >>$(DEST)\hello.def
echo stub '..\..\bin\winstub.exe' >>$(DEST)\hello.def
echo code preload moveable discardable >>$(DEST)\hello.def
echo data preload moveable multiple >>$(DEST)\hello.def
echo heapsize 512 >>$(DEST)\hello.def
echo exports WndProc >>$(DEST)\hello.def
echo imports >>$(DEST)\hello.def
echo WOWQUERYDEBUG = KERNEL.512 >>$(DEST)\hello.def
echo WOWWAITFORMSGANDEVENT = KERNEL.262>>$(DEST)\hello.def
echo WOWMSGBOX = KERNEL.263>>$(DEST)\hello.def
echo WOWPARTYBYNUMBER = KERNEL.273>>$(DEST)\hello.def
!if "$(ALT_PROJECT)" != "USA"
echo WOWNLSDUMMY = WINNLS.6 >>$(DEST)\hello.def
!endif
$(DEST)\hello.res: hello.rc hello.rcv
@set include=$(ENVINCS);$(INCLUDE)
$(RC) -r $(RCFLAGS) -fo $(DEST)\hello.res hello.rc
$(DEST)\hello.exe: $(DEST)\hello.obj $(DEST)\hello.lrf $(DEST)\hello.def $(DEST)\hello.res
$(LINK) @$(DEST)\hello.lrf;
$(RC) -t -31 $(DEST)\hello.res $(DEST)\hello.exe