windows-nt/Source/XPSP1/NT/base/mvdm/wow16/drivers/neccomm/makefile.sub

243 lines
5.5 KiB
Plaintext
Raw Normal View History

2020-09-26 03:20:57 -05:00
# comm16 makefile
#
# Copyright (c) 1992, Microsoft Corporation
#
# History:
# 27-Mar-1992 Nandurir
# Created.
# 6-Feb-1994 LeeHart
# Modified for version resources & CV Symbols
#
!INCLUDE ..\..\makefile.inc
.SUFFIXES:
.SUFFIXES: .c .asm .h .inc .obj .lst .sys .exe .com .map .sym .def .lib .rc .res
NEC_98=1
!if "$(NEC_98)" == "1"
INCS = /I..\..\inc /I..\..\..\inc
!else
!ifdef INCLUDE
INCS =
!else
INCS = -I..\..\inc -I..\..\..\inc
!endif
!endif
!if "$(NEC_98)" == "1"
DEFINES = /W1 /DWINNT /DNEC_98
!else
DEFINES = -DWOW $(MVDMFLAGS)
!endif
!if "$(NEC_98)" == "1"
AOBJ = $(DEFINES) $(INCS)
!else
AOBJ = -t $(DEFINES) $(INCS)
!endif
CW16 = -AS -G2sw -Os -W3 -Zp $(DEFINES) $(INCS)
CW16B = $(CW16) -B1 c1l.exe -B2 c2l.exe -B3 c3l.exe
RES_DIR = $(DEST)
OBJ_DIR = $(DEST)
LINK = /map /align:16
!if !$(FREEBUILD)
!if "$(NEC_98)" == "1"
AOBJ = $(AOBJ) /Zd
!else
AOBJ = $(AOBJ) -Zd
!endif
CW16 = $(CW16) /Od /Oi /Zd
LINK = $(LINK) /LI
!endif
W16LIBS = ..\..\lib\snocrtd.lib
.asm.obj:
masm $(AOBJ) $*;
!ifdef ALT_PROJECT
.asm{$(OBJ_DIR)\}.obj:
masm $(AOBJ) $<,$(OBJ_DIR)\;
{$(RES_DIR)\}.asm{$(OBJ_DIR)\}.obj:
masm $(AOBJ) $<,$(OBJ_DIR)\;
!endif
.asm.lst:
masm $(AOBJ) -l $*,nul,$*.lst;
.c.obj:
cl16 -c -nologo $(CW16) $*.c
.c.lst:
cl16 -c -nologo $(CW16) -Fonul -Fc$*.lst $*.c
.def.lib:
implib $*.lib $*.def
.map.sym:
mapsym $*
.rc.res:
rc16 -r $(INCS) -fo $@ $*.rc
!ifdef ALT_PROJECT
all: makedir $(OBJ_DIR)\comm.drv
!if "$(NEC_98)" == "1"
binplace -o $(ALT_PROJECT_TARGET) $(OBJ_DIR)\comm.drv $(OBJ_DIR)\comm.map $(OBJ_DIR)\comm.sym
!else
binplace $(OBJ_DIR)\comm.drv $(OBJ_DIR)\comm.map $(OBJ_DIR)\comm.sym
!endif
makedir:
@-if not exist $(OBJ_DIR) md $(OBJ_DIR)
!else
all: comm.drv comm.map comm.sym comm.lrf
binplace comm.drv comm.map comm.sym
!endif
clean: cleanup all
cleanup:
if exist *.lrf del *.lrf
if exist *.obj del *.obj
if exist *.exe del *.exe
if exist *.map del *.map
if exist *.sym del *.sym
if exist *.drv del *.drv
if exist *.res del *.res
!ifdef ALT_PROJECT
if exist $(OBJ_DIR)\*.lrf del $(OBJ_DIR)\*.lrf
if exist $(OBJ_DIR)\*.obj del $(OBJ_DIR)\*.obj
if exist $(OBJ_DIR)\*.exe del $(OBJ_DIR)\*.exe
if exist $(OBJ_DIR)\*.map del $(OBJ_DIR)\*.map
if exist $(OBJ_DIR)\*.sym del $(OBJ_DIR)\*.sym
if exist $(OBJ_DIR)\*.drv del $(OBJ_DIR)\*.drv
if exist $(OBJ_DIR)\*.res del $(OBJ_DIR)\*.res
if exist $(OBJ_DIR)\*.def del $(OBJ_DIR)\*.def
if exist $(OBJ_DIR)\*.asm del $(OBJ_DIR)\*.asm
!endif
!ifdef ALT_PROJECT
!if "$(NEC_98)" == "1"
$(OBJ_DIR)\dispatch.obj dispatch.lst: dispatch.asm
!else
$(OBJ_DIR)\ccom.obj ccom.lst: ccom.asm ibmcom.inc comdev.inc
$(OBJ_DIR)\ibmsetup.obj ibmsetup.lst: ibmsetup.asm ibmcom.inc comdev.inc ins8250.inc
$(OBJ_DIR)\ibmcom.obj: ibmcom.asm ibmcom.inc comdev.inc ins8250.inc
$(OBJ_DIR)\ibmint.obj: ibmint.asm ibmcom.inc comdev.inc ins8250.inc
$(OBJ_DIR)\ibmlpt.obj: ibmlpt.asm ibmcom.inc comdev.inc
$(OBJ_DIR)\commmsg.obj: $(RES_DIR)\commmsg.asm
$(RES_DIR)\commmsg.asm: commmsg.asm
copy commmsg.asm $(OBJ_DIR)
if exist commmsg.$(ALT_PROJECT) copy commmsg.$(ALT_PROJECT) $(OBJ_DIR)\commmsg.asm
!endif
!else
ccom.obj ccom.lst: ccom.asm ibmcom.inc comdev.inc
ibmsetup.obj ibmsetup.lst: ibmsetup.asm ibmcom.inc comdev.inc ins8250.inc
ibmcom.obj: $*.asm $*.inc comdev.inc ins8250.inc
ibmint.obj: $*.asm ibmcom.inc comdev.inc ins8250.inc
ibmlpt.obj: $*.asm ibmcom.inc comdev.inc
commmsg.obj: $*.asm
!endif
!ifdef ALT_PROJECT
!if "$(NEC_98)" == "1"
$(OBJ_DIR)\comm.res: comm.rc comm.rcv ..\..\inc\common.ver
rc16 -r $(INCS) -fo$*.res comm.rc
!else
$(OBJ_DIR)\comm.res: comm.rc comm.rcv ..\..\inc\common.ver
rc16 -r $(INCS) -fo $@ comm.rc
!endif
!else
comm.res: $*.rc $*.rcv ..\..\inc\common.ver
!endif
!ifdef ALT_PROJECT
!if "$(NEC_98)" == "1"
$(OBJ_DIR)\comm.lrf: makefile.sub
echo dispatch >$@
echo comm.exe/align:16>>$@
echo comm $(LINK)>>$@
echo ..\..\..\..\..\lib\$(ALT_PROJECT)\libw.lib ..\..\..\..\..\lib\snocrtd.lib ..\..\..\..\..\lib\$(DEST)\system.lib /map /nod>>$@
echo comm;>>$@
!else
$(OBJ_DIR)\comm.lrf: makefile.sub
echo ccom+ibmsetup+ibmcom+ibmint+ibmlpt+commmsg >$@
echo comm.exe/align:16>>$@
echo comm $(LINK)>>$@
echo ..\..\..\lib\$(ALT_PROJECT)\libw.lib ..\..\..\lib\snocrtd.lib /map /nod>>$@
echo comm;>>$@
!endif
!else
comm.lrf: makefile.sub
echo ccom+ibmsetup+ibmcom+ibmint+ibmlpt+commmsg >$@
echo $*.exe/align:16>>$@
echo $* $(LINK)>>$@
echo ..\..\lib\$(ALT_PROJECT)\libw.lib ..\..\lib\snocrtd.lib /map /nod>>$@
echo $*;>>$@
!endif
!ifdef ALT_PROJECT
$(OBJ_DIR)\comm.def: comm.def
copy comm.def $(OBJ_DIR)
!endif
!ifdef ALT_PROJECT
!if "$(NEC_98)" == "1"
$(OBJ_DIR)\comm.drv: $(OBJ_DIR)\dispatch.obj $(OBJ_DIR)\comm.def $(OBJ_DIR)\comm.res $(OBJ_DIR)\comm.lrf
cd $(OBJ_DIR)
link16 @comm.lrf;
rc16 -t comm.res comm.exe
if exist *.drv del *.drv
ren comm.exe *.drv
mapsym comm
cd ..\..\..
!else
$(OBJ_DIR)\comm.drv: $(OBJ_DIR)\ccom.obj $(OBJ_DIR)\ibmsetup.obj $(OBJ_DIR)\ibmcom.obj $(OBJ_DIR)\ibmint.obj $(OBJ_DIR)\ibmlpt.obj $(OBJ_DIR)\commmsg.obj \
$*.def $*.res $*.lrf
cd $(OBJ_DIR)
link16 @comm.lrf;
rc16 -t comm.res comm.exe
if exist *.drv del *.drv
ren comm.exe *.drv
mapsym comm
cd ..\..\..
!endif
!else
comm.drv: ccom.obj ibmsetup.obj ibmcom.obj ibmint.obj ibmlpt.obj commmsg.obj \
$*.def $*.res $*.lrf
link16 @$*.lrf;
rc16 -t $*.res $*.exe
if exist *.drv del *.drv
ren $*.exe $@
comm.sym: $*.map
mapsym $*
!endif