239 lines
5.8 KiB
Plaintext
239 lines
5.8 KiB
Plaintext
|
# 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
|
||
|
|
||
|
!ifdef INCLUDE
|
||
|
INCS =
|
||
|
!else
|
||
|
INCS = -I..\..\inc -I..\..\..\inc
|
||
|
!endif
|
||
|
|
||
|
# DEFINES = -DWOW -DDEBUG $(MVDMFLAGS)
|
||
|
!if "$(NEC_98)" == "1"
|
||
|
DEFINES = -W2 -DNEC_98 -DKKBUGFIX -DWOW $(MVDMFLAGS) -DWINNT
|
||
|
!else
|
||
|
DEFINES = -DWOW $(MVDMFLAGS)
|
||
|
!endif
|
||
|
|
||
|
AOBJ = -t $(DEFINES) $(INCS)
|
||
|
|
||
|
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) -Zi
|
||
|
CW16 = $(CW16) /Od /Oi /Zi
|
||
|
LINK = $(LINK) /CO
|
||
|
!else
|
||
|
AOBJ = $(AOBJ) -Zd
|
||
|
CW16 = $(CW16) /Od /Oi /Zd
|
||
|
LINK = $(LINK) /LI
|
||
|
!endif
|
||
|
!endif
|
||
|
|
||
|
W16LIBS = ..\..\lib\snocrtd.lib
|
||
|
|
||
|
|
||
|
.asm.obj:
|
||
|
masm $(AOBJ) $*;
|
||
|
|
||
|
!ifdef ALT_PROJECT
|
||
|
.asm{$(OBJ_DIR)\}.obj:
|
||
|
masm $(AOBJ) $<,$(OBJ_DIR)\;
|
||
|
|
||
|
!if "$(NEC_98)" == "1"
|
||
|
{$(OBJ_DIR)\}.asm{$(OBJ_DIR)\}.obj:
|
||
|
masm $(AOBJ) $<,$(OBJ_DIR)\;
|
||
|
!else
|
||
|
{$(RES_DIR)\}.asm{$(OBJ_DIR)\}.obj:
|
||
|
masm $(AOBJ) $<,$(OBJ_DIR)\;
|
||
|
!endif
|
||
|
!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
|
||
|
!if "$(NEC_98)" == "1"
|
||
|
all: $(OBJ_DIR)\neccomm.drv
|
||
|
binplace -o $(ALT_PROJECT_TARGET) $(OBJ_DIR)\neccomm.drv $(OBJ_DIR)\neccomm.map $(OBJ_DIR)\neccomm.sym
|
||
|
!else
|
||
|
all: $(OBJ_DIR)\comm.drv
|
||
|
binplace $(OBJ_DIR)\comm.drv $(OBJ_DIR)\comm.map $(OBJ_DIR)\comm.sym
|
||
|
!endif
|
||
|
|
||
|
|
||
|
!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
|
||
|
$(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
|
||
|
|
||
|
!if "$(NEC_98)" == "1"
|
||
|
$(OBJ_DIR)\commmsg.obj: $(OBJ_DIR)\commmsg.asm
|
||
|
|
||
|
$(OBJ_DIR)\commmsg.asm: commmsg.asm
|
||
|
copy commmsg.asm $(OBJ_DIR)
|
||
|
if exist commmsg.$(ALT_PROJECT) copy commmsg.$(ALT_PROJECT) $(OBJ_DIR)\commmsg.asm
|
||
|
!else
|
||
|
$(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
|
||
|
$(OBJ_DIR)\comm.res: comm.rc comm.rcv ..\..\inc\common.ver
|
||
|
rc16 -r $(INCS) -fo $@ comm.rc
|
||
|
!else
|
||
|
comm.res: $*.rc $*.rcv ..\..\inc\common.ver
|
||
|
!endif
|
||
|
|
||
|
!ifdef ALT_PROJECT
|
||
|
!if "$(NEC_98)" == "1"
|
||
|
$(OBJ_DIR)\comm.lrf: makefile.sub
|
||
|
echo ccom+ibmsetup+ibmcom+ibmint+ibmlpt+commmsg >$@
|
||
|
echo neccomm.exe/align:16>>$@
|
||
|
echo neccomm $(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)\neccomm.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 \
|
||
|
$(OBJ_DIR)\comm.def $(OBJ_DIR)\comm.res $(OBJ_DIR)\comm.lrf
|
||
|
cd $(OBJ_DIR)
|
||
|
link16 @comm.lrf;
|
||
|
rc16 -t comm.res neccomm.exe
|
||
|
if exist *.drv del *.drv
|
||
|
ren neccomm.exe *.drv
|
||
|
mapsym neccomm
|
||
|
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
|