# Makefile for NDIS2 Driver v1.0 2002.5.24
# Makefile for NDIS2 Driver v1.1 2002.6.12
# Makefile for NDIS2 Driver v1.2 2002.7.23

base_dir = c:\masm5\bin
as = $(base_dir)\masm.exe
asflag = /t
define = /DLinkChange /DDOS 
#/DDYNAALLOC

src = init.asm util.asm data.asm bind.asm req.asm recv.asm xmit.asm msg.asm intr.asm srom.asm crc.asm

link = $(base_dir)\link
lflag = /NOI
obj1 = data.obj msg.obj init.obj bind.obj 
obj2 = util.obj req.obj recv.obj xmit.obj 
obj3 = intr.obj
crcobj = crc.obj srom.obj
objs = $(obj1) $(obj2) $(obj3)
dbobj = dbgtools.obj

# make option
# PLATFORM,OEM,DEBUG



!if "$(PLATFORM)" == "WIN95" 
define=$(define) /DWIN95
!endif

!if "$(OEM)" == "DLINK" 
define = $(define) /DNONWAYFORCEMODE /DPROTECTED
objs = $(objs) $(crcobj)
obj3 = $(obj3) $(crcobj)
!endif

!if "$(DEBUG)" == "ON"
define = $(define) /DDBG=1
objs = $(objs) $(dbobj)
!endif

target=fetnd


.SUFFIXES: .asm


all: $(target) 


$(target): $(objs)
    @echo $(obj1) +>  linkfile.dos
    @echo $(obj2) +>> linkfile.dos
    @echo $(obj3) >> linkfile.dos
    @echo $(target).dos >> linkfile.dos
    @echo $(target).map/M; >> linkfile.dos
    $(link) $(lflag) @linkfile.dos

.asm.obj :
    $(as) $(asflag) $(define) $<,$@;


    
clean:
    @del *.obj
    @if exist linkfile.dos del linkfile.dos
    @if exist $(target).dos del $(target).dos

    
update: clear all

 
    
        