# 1730, Thu 3 Oct 96
#
#  NETRAMET makefile

DEBUG =     E   # E to enable, D to disable
PROCESSOR = 3   # 3 for 386..Pentium, 5 for Pentium only

!if '$(DEBUG)'=='E'
CDEBUG= -v
ADEBUG= /zi  # intr2 doesn't like this <<<<<
TEXTDEBUG=enabled
!elif '$(DEBUG)'=='D'
TEXTDEBUG=disabled
!else
!error  DEBUG must be set to either E or D
!endif

!if '$(PROCESSOR)'=='3'
PROC= -3 -DCLK_86
!elif '$(PROCESSOR)'=='5'
PROC= -5
!else
!error  PROCESSOR must be set to either 3 or 5
!endif

CC=bcc32
CFLAGS= $(PROC) -WX -w-par -a- -P -Otcgabeimpv -O -Z  $(CDEBUG) \
    -DAU_MSDOS -DOC3MON  -I..\snmplib -I..\wattcp

all:    tim_test

.c.obj:
    $(CC) $(CFLAGS) -c $*.c

.cpp.obj:
    $(CC) $(CFLAGS) -c $*.cpp

.asm.obj:
    tasm32 /r /D__CDECL__ /m2 /ml $*  # Joel's options for intr2.asm

clean:
    del error*.
    del *.lib
    del *.obj
    del *.exe
    del *.tr
    del *.tr2

#tcp_objs=  intr.obj intr2.obj phys.obj realmode.obj real2.obj far.obj
dpm_objs=   phys.obj timeout.obj

far.obj:      ..\dpmi32\far.asm
intr.obj:     ..\dpmi32\intr.c
intr2.obj:    ..\dpmi32\intr2.asm
phys.obj:     ..\dpmi32\phys.c
realmode.obj: ..\dpmi32\realmode.c
real2.obj:    ..\dpmi32\real2.asm

timeout.obj:  ..\wattcp\timeout.cpp ..\intel\timestmp.h

timestmp.obj:  ..\intel\timestmp.cpp  # Reads clock registers
time_test.obj: ..\intel\timestmp.h

tim_test:  tim_test.obj timestmp.obj $(dpm_objs)
    $(CC) $(CFLAGS) @&&!
tim_test.obj timestmp.obj $(dpm_objs)
!

