
BIN=bin
OBJ=obj

target: $(BIN)/demoa.usbhcd\
        $(BIN)/demob.usbhcd\
        $(BIN)/demo.usbhcd\
        $(BIN)/hostusb.usbhcd

#CFLAGS=parms=register
CFLAGS=
COPTAS=opt nostackcheck optpeep optgo optinline optloop opttime
COPTS=nostackcheck
#CSTARTUP=lib:cres.o
CSTARTUP=lib:c.o


$(OBJ)/devent.o: devent.asm
  genam -l -iasminclude: -o$(OBJ)/devent.o devent.asm

$(OBJ)/hcddemoa.o: hcddemo.c
  sc $(CFLAGS) $(COPTS) OBJNAME $(OBJ)/hcddemoa.o hcddemo.c

$(OBJ)/hcddemob.o: hcddemo.c
  sc $(CFLAGS) $(COPTS) OBJNAME $(OBJ)/hcddemob.o DEFINE OKMOUSE hcddemo.c

$(OBJ)/hcddemo.o: hcddemo.c
  sc $(CFLAGS) $(COPTS) OBJNAME $(OBJ)/hcddemo.o DEFINE OKMOUSE DEFINE OKPRINTER DEFINE OKPSC2200 hcddemo.c

$(OBJ)/hostusbdll.o: hostusbdll.asm
  genam -l -o$(OBJ)/hostusbdll.o hostusbdll.asm

$(OBJ)/hostusb.o: hostusb.c hostusb.h
  sc $(CFLAGS) $(COPTS) OBJNAME $(OBJ)/hostusb.o hostusb.c

$(OBJ)/hostusbhcd.o: hcddemo.c hostusb.h
  sc $(CFLAGS) $(COPTS) OBJNAME $(OBJ)/hostusbhcd.o DEFINE OKHOSTDLL DEFINE OKMOUSE DEFINE OKPRINTER DEFINE OKPSC2200 hcddemo.c

$(BIN)/demoa.usbhcd: $(OBJ)/devent.o $(OBJ)/hcddemoa.o
  slink $(OBJ)/devent.o,$(OBJ)/hcddemoa.o\
  TO $(BIN)/demoa.usbhcd\
  LIB lib:sc.lib,lib:amiga.lib\
  VERBOSE NOICONS

$(BIN)/demob.usbhcd: $(OBJ)/devent.o $(OBJ)/hcddemob.o
  slink $(OBJ)/devent.o,$(OBJ)/hcddemob.o\
  TO $(BIN)/demob.usbhcd\
  LIB lib:sc.lib,lib:amiga.lib\
  VERBOSE NOICONS

$(BIN)/demo.usbhcd: $(OBJ)/devent.o $(OBJ)/hcddemo.o
  slink $(OBJ)/devent.o,$(OBJ)/hcddemo.o\
  TO $(BIN)/demo.usbhcd\
  LIB lib:sc.lib,lib:amiga.lib\
  VERBOSE NOICONS

$(BIN)/hostusb.usbhcd: $(OBJ)/devent.o $(OBJ)/hostusbhcd.o $(OBJ)/hostusb.o $(OBJ)/hostusbdll.o
  slink $(OBJ)/devent.o,$(OBJ)/hostusbhcd.o,$(OBJ)/hostusb.o,$(OBJ)/hostusbdll.o\
  TO $(BIN)/hostusb.usbhcd\
  LIB lib:sc.lib,lib:amiga.lib\
  VERBOSE NOICONS

