###############
# Définitions #
###############
MODNAME	        = //Turbo/AMI-CPC

ASSEMBLER       = GENAM
ASSEMBLER_OPTS  = -vp=68020 -vo+,ow6- -l

LINKER          = SLINK
LINKER_OPTS	    = NOICONS STRIPDEBUG

STARTUP         = LIB:c.o
LIBS	        = LIB:sc.lib LIB:amiga.lib

OBJECTS         = regs.o     fctfirst.o fcted.o    fctcb.o    fctddcb.o  \
                  fctix.o    fctiy.o    vga.o      mainasm.o  /gestport.o \
                  /crtc.o    /ppi.o     /upd.o     /process.o /invite.o  \
                  /sound.o   /joystick.o /debug.o  /main.o

##############################
# Génération de l'exécutable #
##############################
$(MODNAME):	$(OBJECTS) $(LIBS)
    $(LINKER) FROM $(STARTUP) $(OBJECTS) TO $(MODNAME) LIB $(LIBS) $(LINKER_OPTS)


#######################################
# Génération des fichiers objets (.o) #
#######################################
.s.o:
    $(ASSEMBLER)  $(ASSEMBLER_OPTS)  $*.s


############################
# dépendances des fichiers #
############################
regs.o      : regs.s
fctcb.o     : fctcb.s       regs.i      vga.i
fctddcb.o   : fctddcb.s     regs.i      vga.i
fctix.o     : fctix.s       regs.i      vga.i       tools.i
fctiy.o     : fctiy.s       regs.i      vga.i       tools.i
fcted.o     : fcted.s       regs.i      vga.i       tools.i
fctfirst.o  : fctfirst.s    regs.i      vga.i       tools.i
vga.o       : vga.s         regs.i      vgacst.i
mainasm.o   : mainasm.s     regs.i      vga.i       vgacst.i    tools.i
