#
#	$VER: makefile 1.1 (25.02.94)
#
#	makefile for debug.library
#	© Copyright 1994 by Norbert Püschel
#	All Rights Reserved
#

#------------------ files -------------------------------------------------

MAIN_TARGETS = debug.library

CINCL   =

CSRC	= debuglib.c

COBJS	= debuglib.o

ASRC	=
AOBJS	=

LHDR	= debughdr.o

DCF	= DEF=__USE_SYSBASE

CF	= $(DCF) NOSTKCHK IDIR=/include

DAF	=

AF	= $(DAF) -iINCLUDE: -i/include/

LOPTS	= SC SD ND NOICONS

LLIBS	= LIB:sc.lib LIB:amiga.lib

#------------------ rules -------------------------------------------------

.a.o:
	asm $(AF) $*.a

.c.o:
	sc $(CF) $*.c

.fd.i:
	fd2i $*.fd $@

.fd.a:
        fd2stub $*.fd $@

.o.lib:
	oml $@ r $?

.a.doc:
	autodoc >$@ -a -I -t8 $(ASRC)

.c.doc:
	autodoc >$@ -C -c -I -t8 $(CSRC)

#------------------ commands ---------------------------------------------

all: $(MAIN_TARGETS)

bump:
	bumprev 1 debug.library

# library

debug.library: $(LHDR) $(AOBJS) $(COBJS)
	slink < WITH < 
          $(LOPTS)
          FROM $(LHDR) $(AOBJS) $(COBJS) 
          TO $@ 
          LIB $(LLIBS)
        <
	copy $@ LIBS: clone
	avail >NIL: flush
	avail >NIL: flush

debuglib.o: debuglib.c

debughdr.o: debughdr.a debug.library_rev.i
	asm $(AF) debughdr.a

$(COBJS): $(CINCL)


