
#DEBUG  = -dDEBUG=1
DEBUG =

#LIBS   = lib:lc.lib lib:amiga.lib define _SysBase = _AbsExecBase
LIBS   = lib:lc.lib lib:amiga.lib define _SysBase = 4

LC1FLAGS = -cwusf -b -d $(DEBUG) -i/
LC2FLAGS = -v

netdnet-handler:  netdnet-handler.d
   @blink from $+ to $@ nodebug

netser-handler:  netser-handler.d
   @blink from $+ to $@ nodebug

netpar-handler:  netpar-handler.d
   @blink from $+ to $@ nodebug

netsing-handler:  netsing-handler.d
   @blink from $+ to $@ nodebug

netdnet-handler.d:  main.o /subs.o file.o dir.o io.o lock.o process.o\
                  /sendpkt.o volume.o device.o /request.o mount.o devio.o\
                  netdnet.o /iodnet.o /dnetlib.o /debug.o /timer.o
  @echo >ram:tmp.with "from $+"
  @assign blinkwith:
  @blink with ram:tmp.with SC SD VERBOSE BATCH to $@ lib $(LIBS)\
         map netdnet-handler.map hx
  @protect $@ -e

netsing-handler.d:  main.o /subs.o file.o dir.o io.o lock.o process.o\
                  /sendpkt.o volume.o device.o /request.o mount.o devio.o\
                  netsing.o iosing.o /debug.o /timer.o
  @echo >ram:tmp.with "from $+"
  @assign blinkwith:
  @blink with ram:tmp.with SC SD VERBOSE BATCH to $@ lib $(LIBS)
  @protect $@ -e

netser-handler.d:  main.o /subs.o file.o dir.o io.o lock.o process.o \
                 /sendpkt.o volume.o device.o /request.o mount.o devio.o\
                 netser.o /ioser.o /debug.o /timer.o
  @echo >ram:tmp.with "from $+"
  @assign blinkwith:
  @blink with ram:tmp.with SC SD VERBOSE BATCH to $@ lib $(LIBS)
  @protect $@ -e

netpar-handler.d:  main.o /subs.o file.o dir.o io.o lock.o process.o \
                 /sendpkt.o volume.o device.o /request.o mount.o devio.o\
                 netpar.o /iopar.o /debug.o /timer.o
  @echo >ram:tmp.with "from $+"
  @assign blinkwith:
  @blink with ram:tmp.with SC SD VERBOSE BATCH to $@ lib $(LIBS)
  @protect $@ -e

main.o : main.c handler.h /netcomm.h
 @echo "Compiling $<"
 @lc1 -. $(LC1FLAGS) -oram:temp.q $<
 @lc2 -. $(LC2FLAGS) -y -o$@ ram:temp.q

/dnetlib.o : /dnetlib.c
 @echo "Compiling $<"
 @lc1 -. $(LC1FLAGS) -oram:temp.q $<
 @lc2 -. $(LC2FLAGS) -y -o$@ ram:temp.q